Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-35

A exported xlsx is not loadable again by Excel or Spreadsheet

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.1
    • Component/s: None
    • Labels:
      None

      Description

      see attached document, it was exported by ExcelExporter, and could not be open by Excel or Spreadsheet anymore.
      to reproduce this file.
      1.use spreadsheet and src to a empty xlsx.
      2.in spreadsheet, in A1, input 'A'
      3.drag the right-bottom corner to A2 or A3, it will copy A1 to A2 , and A3 as well.
      4.use exporter to export this book.

      1. canNotOpen.xlsx
        6 kB
        dennis
      2. canNotOpen.xlsx
        6 kB
        dennis

        Issue Links

          Activity

          Hide
          dennis dennis added a comment -

          Caused by: com.ibm.jscript.InterpretException: Script interpreter error, line=1, col=11: Error calling method 'doLoad()' on java class 'demo.ctrl.LoadSaver'
          at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:334)
          at com.ibm.jscript.types.FBSObject.call(FBSObject.java:161)
          at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175)
          at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119)
          at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139)
          at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435)
          at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424)
          at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414)
          at java.security.AccessController.doPrivileged(AccessController.java:284)
          at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410)
          at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251)
          at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234)
          at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:220)
          at com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(JavaScriptMethodBinding.java:111)
          ... 27 more
          Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
          at demo.ctrl.LoadSaver$2.doAction(LoadSaver.java:58)
          at org.zkoss.xpage.core.component.ZulBridgeBase.execute(ZulBridgeBase.java:245)
          at demo.ctrl.LoadSaver.doLoad(LoadSaver.java:49)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
          at java.lang.reflect.Method.invoke(Method.java:600)
          at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:321)
          ... 40 more
          Caused by: org.zkoss.poi.POIXMLException: java.lang.reflect.InvocationTargetException
          at org.zkoss.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:62)
          at org.zkoss.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:293)
          at org.zkoss.poi.POIXMLDocument.load(POIXMLDocument.java:186)
          at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:246)
          at org.zkoss.zss.model.impl.XSSFBookImpl.<init>(XSSFBookImpl.java:96)
          at org.zkoss.zss.model.impl.ExcelImporter.importsFromStream(ExcelImporter.java:117)
          at org.zkoss.zss.model.impl.ExcelImporter.imports(ExcelImporter.java:61)
          at demo.service.FileSystemBookService.loadBook(FileSystemBookService.java:36)
          at demo.ctrl.LoadSaver$2.doAction(LoadSaver.java:56)
          ... 47 more
          Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:516)
          at org.zkoss.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60)
          ... 55 more
          Caused by: java.io.IOException: error: Unexpected element: XML_DOC_OR_TEXT_DECL
          at org.zkoss.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:120)
          at org.zkoss.poi.xssf.model.SharedStringsTable.<init>(SharedStringsTable.java:97)
          ... 60 more

          Show
          dennis dennis added a comment - Caused by: com.ibm.jscript.InterpretException: Script interpreter error, line=1, col=11: Error calling method 'doLoad()' on java class 'demo.ctrl.LoadSaver' at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:334) at com.ibm.jscript.types.FBSObject.call(FBSObject.java:161) at com.ibm.jscript.ASTTree.ASTCall.interpret(ASTCall.java:175) at com.ibm.jscript.ASTTree.ASTProgram.interpret(ASTProgram.java:119) at com.ibm.jscript.ASTTree.ASTProgram.interpretEx(ASTProgram.java:139) at com.ibm.jscript.JSExpression._interpretExpression(JSExpression.java:435) at com.ibm.jscript.JSExpression.access$1(JSExpression.java:424) at com.ibm.jscript.JSExpression$2.run(JSExpression.java:414) at java.security.AccessController.doPrivileged(AccessController.java:284) at com.ibm.jscript.JSExpression.interpretExpression(JSExpression.java:410) at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:251) at com.ibm.jscript.JSExpression.evaluateValue(JSExpression.java:234) at com.ibm.xsp.javascript.JavaScriptInterpreter.interpret(JavaScriptInterpreter.java:220) at com.ibm.xsp.binding.javascript.JavaScriptMethodBinding.invoke(JavaScriptMethodBinding.java:111) ... 27 more Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at demo.ctrl.LoadSaver$2.doAction(LoadSaver.java:58) at org.zkoss.xpage.core.component.ZulBridgeBase.execute(ZulBridgeBase.java:245) at demo.ctrl.LoadSaver.doLoad(LoadSaver.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at com.ibm.jscript.types.JavaAccessObject.call(JavaAccessObject.java:321) ... 40 more Caused by: org.zkoss.poi.POIXMLException: java.lang.reflect.InvocationTargetException at org.zkoss.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:62) at org.zkoss.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:293) at org.zkoss.poi.POIXMLDocument.load(POIXMLDocument.java:186) at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:246) at org.zkoss.zss.model.impl.XSSFBookImpl.<init>(XSSFBookImpl.java:96) at org.zkoss.zss.model.impl.ExcelImporter.importsFromStream(ExcelImporter.java:117) at org.zkoss.zss.model.impl.ExcelImporter.imports(ExcelImporter.java:61) at demo.service.FileSystemBookService.loadBook(FileSystemBookService.java:36) at demo.ctrl.LoadSaver$2.doAction(LoadSaver.java:56) ... 47 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39) at java.lang.reflect.Constructor.newInstance(Constructor.java:516) at org.zkoss.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:60) ... 55 more Caused by: java.io.IOException: error: Unexpected element: XML_DOC_OR_TEXT_DECL at org.zkoss.poi.xssf.model.SharedStringsTable.readFrom(SharedStringsTable.java:120) at org.zkoss.poi.xssf.model.SharedStringsTable.<init>(SharedStringsTable.java:97) ... 60 more
          Hide
          dennis dennis added a comment -

          it seems not stable, see the attached file, both from the same steps, but one file ok, another not.

          Show
          dennis dennis added a comment - it seems not stable, see the attached file, both from the same steps, but one file ok, another not.
          Hide
          dennis dennis added a comment -

          Ok, after some test, it is not caused by cell drag. the defect is, a book could not be exported twice.
          to reproduce..
          1. create a spreadsheet
          2. use exporter to export excel.
          3. export again.
          4. view the xlsx by Excel
          5. create a spreadsheet , src set to this file.

          Show
          dennis dennis added a comment - Ok, after some test, it is not caused by cell drag. the defect is, a book could not be exported twice. to reproduce.. 1. create a spreadsheet 2. use exporter to export excel. 3. export again. 4. view the xlsx by Excel 5. create a spreadsheet , src set to this file.
          Hide
          henrichen henrichen added a comment -

          Fixed since Aug. 19.

          The previous content of the associated MemoryPackagePart in SharedStringTable is not cleared and the output file xl/sharedStrings.xml accumulates two set of SharedStringTables information (actually, each export will add one more set). Thus Excel complains the bad xml format.

          Show
          henrichen henrichen added a comment - Fixed since Aug. 19. — The previous content of the associated MemoryPackagePart in SharedStringTable is not cleared and the output file xl/sharedStrings.xml accumulates two set of SharedStringTables information (actually, each export will add one more set). Thus Excel complains the bad xml format.

            People

            • Assignee:
              Unassigned
              Reporter:
              dennis dennis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: