Excel import

0
While importing data i get this error message   The following error occurred when importing document: TestSemester.xlsx -------- com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:23) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0    at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:127) Caused by: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0    at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:382) Caused by: org.xml.sax.SAXException: Unable to store Excel row #2 @Sheet #0    at excelimporter.reader.readers.ExcelDataReader.readData(ExcelDataReader.java:36)    at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:361)    at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:118)    at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:61)    at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:25)    at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:58)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48)    at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57)    at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:104)    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20)    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:103)    at com.mendix.basis.actionmanagement.UserActionCallBuilderImpl.execute(UserActionCallBuilderImpl.scala:59)    at com.mendix.modules.microflowengine.actions.actioncall.ForegroundJavaAction.doExecute(ForegroundJavaAction.scala:35)    at com.mendix.modules.microflowengine.actions.actioncall.ForegroundJavaAction.doExecute(ForegroundJavaAction.scala:11)    at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:38)    at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:29)    at scala.Option.flatMap(Option.scala:283)    at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:26)    at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:176)    at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:116)    at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:58)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48)    at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.$anonfun$runMonitoredAction$1(CoreActionHandlerImpl.scala:59)    at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:52)    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20)    at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:52)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:59)    at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:46)    at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57)    at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeAsync$3(ActionManager.scala:87)    at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:687)    at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467)    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)    at java.base/java.lang.Thread.run(Thread.java:829)   When i want to upload this data     I don't know what the problem is or how to solve this
asked
2 answers
0

image.png

This is the import template that i am using

answered
0

Hello Stefan,

 

First, thing i notice is the year column which is in your excel a string value i think and in your model an integer.

 

The rest looks quite fine to me. What i always try to do when I import an excel is to first import it one on one  on an entity that just needs to capture the data; so i do not really use the association and key option, after i upload it i retrieve my imported captured data objects and then execute the mapping and the logic with microflows. 

This also works well with debugging the problem.

 

Hope this helps

 

Good luck

 

 

answered