Excel importer gives an error

0
While trying to import a test file i get an error   The following error occurred when importing document: test.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:31)    at scala.Option.flatMap(Option.scala:283)    at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:28)    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)   This is the test.xslx  
asked
2 answers
1

Hello Stefan, 

 

It looks like it breaks directly at the second row where your data is in, how did you configure your excel import template because it looks like that some excel fields do not have the right datattype compared to your template.

1. What you can do to solve it is first to compare your template with your excel, are there any mismatches in datatype

2. Check your excel on strange or unexpected data for example a number where a string should be or the other way around 

3. If this is not solving it try to first map everything to a string value in your mendix application domain model so adjust your entity and then your template and change field by field backwards to see when the error occurs:

 

Other thing to check is if your MxReflectionmodule is up to date 

 

Hope this helps

Good luck

answered
0

Hey Stefan!

 

Could you check if the template configurations for the columns are mapped correctly, as in the attributes data types are correctly mentioned. 

Additionally, check if mx model eflection is up to date and try again.

 

hope this helps!

answered