Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-314

Importer fails with valid cell names - Edge case cell column to big for int

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 5.5.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Steps to Reproduce

      Run attached file in keikai

      File contains a named ranged using a format such as:

      [letter][number higher than 2147483647]

      Current Result

      HTTP ERROR 500 io.keikai.importer.ImportException: Fail to import named range in sheet Sheet1 from book 3-nameoverflow-row.xlsx

      URI: /tutorial/editor.zul
      STATUS: 500
      MESSAGE: io.keikai.importer.ImportException: Fail to import named range in sheet Sheet1 from book 3-nameoverflow-row.xlsx
      SERVLET: DHtmlLayoutServlet
      CAUSED BY: io.keikai.importer.ImportException: Fail to import named range in sheet Sheet1 from book 3-nameoverflow-row.xlsx
      CAUSED BY: io.keikai.model.InvalidModelOpException: name 'A123123123123123123123123' is not legal: cannot be a cell reference

      Caused by:

      io.keikai.importer.ImportException: Fail to import named range in sheet Sheet1 from book 3-nameoverflow-row.xlsx at io.keikai.importer.XlsxImporter.imports(XlsxImporter.java:319) at io.keikai.range.impl.imexp.ExcelImportAdapter.imports(ExcelImportAdapter.java:48) at io.keikai.range.impl.imexp.AbstractImporter.imports(AbstractImporter.java:57) at io.keikai.ui.Spreadsheet.getSBook(Spreadsheet.java:649) at io.keikai.ui.Spreadsheet.getSelectedSSheet(Spreadsheet.java:828) at io.keikai.ui.Spreadsheet.doInvalidate(Spreadsheet.java:2546) at io.keikai.ui.Spreadsheet.invalidate(Spreadsheet.java:2403) at io.keikai.ui.Spreadsheet.setSrc(Spreadsheet.java:877)

      Expected Result

      works in excel

      Debug Information

      The named range parser checks if the named range is a cell name (cannot be both a cell reference and a named range)

      There is a mechanism to check if the named range "row index" is bigger than the possible max value for Excel row number, but it is stored in and Integer which underflow if the number part is > 2147483647 causing the reference to be incorrectly identified as a valid cell.

      Workaround

      Do not use a name using pattern [letters][number > 2147483647]

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              MDuchemin MDuchemin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: