Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.8.1
    • Fix Version/s: 3.8.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      Sprint 1

      Description

      steps to reproduce

      1. load the attached file
      2. export it as an Excel file

      Actual result

      java.lang.ArrayIndexOutOfBoundsException: -11353
      at java.util.ArrayList.elementData(ArrayList.java:418)
      at java.util.ArrayList.get(ArrayList.java:431)
      at org.zkoss.poi.xssf.model.StylesTable.getCellStyleXfAt(StylesTable.java:340)
      at org.zkoss.poi.xssf.usermodel.XSSFCellStyle.<init>(XSSFCellStyle.java:83)
      at org.zkoss.poi.xssf.usermodel.XSSFNamedStyle.<init>(XSSFNamedStyle.java:54)
      at org.zkoss.poi.xssf.usermodel.XSSFWorkbook.createNamedStyle(XSSFWorkbook.java:1954)
      at org.zkoss.zss.range.impl.imexp.AbstractExcelExporter.toPOINamedStyle(AbstractExcelExporter.java:497)
      at org.zkoss.zss.range.impl.imexp.AbstractExcelExporter.export(AbstractExcelExporter.java:116)
      at org.zkoss.zss.api.impl.ExporterImpl.export(ExporterImpl.java:49)
      at com.azquo.spreadsheet.controller.ZKSpreadsheetCommandController$1.process(ZKSpreadsheetCommandController.java:92)
      at org.zkoss.zssex.ui.UpdateBridge.process(UpdateBridge.java:60)

      Debug information

      related code:

      public class XSSFNamedStyle implements NamedStyle {
      
      
          private int _cellStyleXfId;
      
          private
      	@Override
      	public short getIndex() {
      		return (short) _cellStyleXfId;
      	}
      

      The index is converted to a short and becomes a negative number, but it should be a 0-based integer.

      workaround

      • Do not import named styles. Then exported file content is also correct.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              henrichen henrichen
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile