https://issues.apache.org/bugzilla/show_bug.cgi?id=52111

             Bug #: 52111
           Summary: Parsing of formula with reference intersection
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: zitzelsberger.unistuttg...@googlemail.com
    Classification: Unclassified


Created attachment 27865
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27865
The spreadsheetfile used.

I created a simple .xsf test spreadsheet  (see attachment) that uses refernce
intersection: (C2:D3 D3:E4)

When parsing the Formula of the Cell (HSSF)
Ptg[] ptgs =
FormulaParser.parse(c.getCellFormula(),evaluationWorkbook,c.getCellType(),workbook.getSheetIndex(c.getSheet()));

The following exception is raised:


---- STACKTRACE ----

org.apache.poi.ss.formula.FormulaParseException: Parse error near char 7 'D' in
specified formula '(C2:D3 D3:E4)'. Expected ')'
    at org.apache.poi.ss.formula.FormulaParser.expected(FormulaParser.java:217)
    at org.apache.poi.ss.formula.FormulaParser.Match(FormulaParser.java:249)
    at
org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1106)
    at
org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1077)
    at
org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1064)
    at org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1424)
    at
org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1524)
    at
org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1508)
    at
org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1465)
    at
org.apache.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1445)
    at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:1566)
    at org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:174)
    at main.ListProtectedCells.main(ListProtectedCells.java:52)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to