Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.0
    • Component/s: ZSS Component
    • Security Level: Jimmy
    • Labels:

      Description

      Currently, AbstractExcelImporter determines whether a POI cell style is duplicated or not by cell style's index. But we found some styles with different indexes have identical content (see attached Excel file). 3.5 importer cannot reduce style count for such kind of Excel file. The attached Excel file provided by customers is created by continuously editing and adding sheets in the same file in 2.6 ZSS. Its style object count already exceeds Excel file upper limit according to specification. So open the file with Excel will prompt users to recover it.

      Excel specification and limits
      2003: http://office.microsoft.com/en-001/excel-help/excel-specifications-and-limits-HP005199291.aspx
      2007: http://office.microsoft.com/en-001/excel-help/excel-specifications-and-limits-HP010073849.aspx?CTT=1

      If an importer can compare incoming style and imported style with their content, when two styles content are identical, it reuses previously imported style object without creating new one.

      Notes for Implementation:

      I found XSSFCellStyle and HSSFCellStyle both implement equal() and hash(). Just change current importedStyle key with CellStyle can make this work. (see ReduceRedundantStyleImporter.java)

        Activity

        Show
        henrichen henrichen added a comment - 3.5 https://github.com/zkoss/zkspreadsheet/commit/ae265360e4c78e402b025f70097b6a108043138d
        Hide
        henrichen henrichen added a comment -

        Done.

        Show
        henrichen henrichen added a comment - Done.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: