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

a formula with nested colon operator causes a FormulaParseException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 5.8.0
    • 5.7.0
    • Formula
    • Security Level: Jimmy

      Steps to Reproduce

      1. load the attached file

      Current Result

      [WARNING] /dev-ref/importAnExcelFile/import-src.zul
      io.keikai.importer.ImportException: Fail to import cell C3 in sheet Sheet1 from book keikai-485.xlsx
      at io.keikai.importer.XlsxImporter.imports (XlsxImporter.java:269)
      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:719)
      at io.keikai.ui.Spreadsheet.getSelectedSSheet (Spreadsheet.java:898)
      at io.keikai.ui.Spreadsheet.doInvalidate (Spreadsheet.java:2701)
      at io.keikai.ui.Spreadsheet.invalidate (Spreadsheet.java:2558)
      at io.keikai.ui.Spreadsheet.setSrc (Spreadsheet.java:947)

      org.zkoss.poi.ss.formula.FormulaParseException: Shouldn't run into this case
      at org.zkoss.poi.ss.formula.token.ColonOpNode.accept(ColonOpNode.java:308)
      at org.zkoss.poi.ss.formula.token.FunctionNode.visitChildren(FunctionNode.java:171)
      at org.zkoss.poi.ss.formula.token.TokenToPtgVisitor.visitFunction(TokenToPtgVisitor.java:270)
      at org.zkoss.poi.ss.formula.token.TokenToPtgVisitor.visitFunction(TokenToPtgVisitor.java:65)
      at org.zkoss.poi.ss.formula.token.FunctionNode.accept(FunctionNode.java:164)
      at org.zkoss.poi.ss.formula.token.OpNode.visitChildren(OpNode.java:80)
      at org.zkoss.poi.ss.formula.token.TokenToPtgVisitor.visitColon(TokenToPtgVisitor.java:187)
      at org.zkoss.poi.ss.formula.token.TokenToPtgVisitor.visitColon(TokenToPtgVisitor.java:65)
      at org.zkoss.poi.ss.formula.token.ColonNode.accept(ColonNode.java:39)
      at org.zkoss.poi.ss.formula.FormulaTokenParser.parse(FormulaTokenParser.java:144)
      at io.keikaiex.formula.FormulaEngineEx.parse(FormulaEngineEx.java:84)
      at io.keikai.model.impl.sys.formula.FormulaEngineImpl.parse0(FormulaEngineImpl.java:229)
      at io.keikai.model.impl.sys.formula.FormulaEngineImpl.parse(FormulaEngineImpl.java:187)
      at io.keikai.model.impl.CellImpl.setFormulaValue(CellImpl.java:272)
      at io.keikai.model.impl.CellImpl.setFormulaValue(CellImpl.java:252)
      at io.keikai.model.impl.CellProxy.setFormulaValue(CellProxy.java:111)
      at io.keikai.importer.XlsxImporter.importCell(XlsxImporter.java:1772)
      at io.keikai.importer.XlsxImporter.importRow(XlsxImporter.java:1720)
      at io.keikai.importer.XlsxImporter.imports(XlsxImporter.java:230)
      at io.keikai.range.impl.imexp.ExcelImportAdapter.imports(ExcelImportAdapter.java:48)
      at io.keikai.range.impl.imexp.AbstractImporter.imports(AbstractImporter.java:57)

      Caused by: io.keikai.model.InvalidFormulaException: Shouldn't run into this case
      at io.keikai.model.impl.CellImpl.setFormulaValue (CellImpl.java:275)
      at io.keikai.model.impl.CellImpl.setFormulaValue (CellImpl.java:252)
      at io.keikai.model.impl.CellProxy.setFormulaValue (CellProxy.java:111)
      at io.keikai.importer.XlsxImporter.importCell (XlsxImporter.java:1772)
      at io.keikai.importer.XlsxImporter.importRow (XlsxImporter.java:1720)
      at io.keikai.importer.XlsxImporter.imports (XlsxImporter.java:230)
      at io.keikai.range.impl.imexp.ExcelImportAdapter.imports (ExcelImportAdapter.java:48)
      at io.keikai.range.impl.imexp.AbstractImporter.imports (AbstractImporter.java:57)

      Expected Result

      C3 is 1

      Debug Information

      • =INDIRECT(A1:A3):B10

      Workaround

      don't use nested colon operator

            wenninghsu wenninghsu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: