You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2022/04/22 05:16:43 UTC

[Bug 66022] New: FormulaParseException: Parse error near char 0

https://bz.apache.org/bugzilla/show_bug.cgi?id=66022

            Bug ID: 66022
           Summary: FormulaParseException: Parse error near char 0
           Product: POI
           Version: 5.2.2-FINAL
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: dpswds@gmail.com
  Target Milestone: ---

nested exception is org.apache.poi.ss.formula.FormulaParseException: Parse
error near char 0 ''' in specified formula ''[4]P1(振返(1):P4(方針書(2)'!#REF!'.
Expected number, string, defined name, or data table] with root
cause","stack_trace":"org.apache.poi.ss.formula.FormulaParseException: Parse
error near char 0 ''' in specified formula ''[4]P1(振返(1):P4(方針書(2)'!#REF!'.
Expected number, string, defined name, or data table
        at
org.apache.poi.ss.formula.FormulaParser.expected(FormulaParser.java:272)
        at
org.apache.poi.ss.formula.FormulaParser.parseAsName(FormulaParser.java:932)
        at
org.apache.poi.ss.formula.FormulaParser.parseNonRange(FormulaParser.java:899)
        at
org.apache.poi.ss.formula.FormulaParser.parseRangeable(FormulaParser.java:496)
        at
org.apache.poi.ss.formula.FormulaParser.parseRangeExpression(FormulaParser.java:325)
        at
org.apache.poi.ss.formula.FormulaParser.parseSimpleFactor(FormulaParser.java:1553)
        at
org.apache.poi.ss.formula.FormulaParser.percentFactor(FormulaParser.java:1511)
        at
org.apache.poi.ss.formula.FormulaParser.powerFactor(FormulaParser.java:1498)
        at
org.apache.poi.ss.formula.FormulaParser.Term(FormulaParser.java:1872)
        at
org.apache.poi.ss.formula.FormulaParser.additiveExpression(FormulaParser.java:1999)
        at
org.apache.poi.ss.formula.FormulaParser.concatExpression(FormulaParser.java:1983)
        at
org.apache.poi.ss.formula.FormulaParser.comparisonExpression(FormulaParser.java:1940)
        at
org.apache.poi.ss.formula.FormulaParser.intersectionExpression(FormulaParser.java:1913)
        at
org.apache.poi.ss.formula.FormulaParser.unionExpression(FormulaParser.java:1894)
        at
org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:2041)
        at
org.apache.poi.ss.formula.FormulaParser.parse(FormulaParser.java:173)
        at
org.apache.poi.xssf.usermodel.helpers.XSSFRowColShifter.updateNamedRanges(XSSFRowColShifter.java:63)
        at
org.apache.poi.xssf.usermodel.helpers.XSSFRowShifter.updateNamedRanges(XSSFRowShifter.java:41)
        at
org.apache.poi.xssf.usermodel.XSSFSheet.shiftRows(XSSFSheet.java:2981)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66022] FormulaParseException: Parse error near char 0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66022

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Can you provide a sample file that allows to reproduce this error?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66022] FormulaParseException: Parse error near char 0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66022

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66022] FormulaParseException: Parse error near char 0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66022

--- Comment #3 from renfilpe@yahoo.com ---
Created attachment 38300
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38300&action=edit
unit tests and first try for fix

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66022] FormulaParseException: Parse error near char 0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66022

--- Comment #2 from max <dp...@gmail.com> ---
Created attachment 38259
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38259&action=edit
sample file

You can try this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66022] FormulaParseException: Parse error near char 0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66022

renfilpe@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from renfilpe@yahoo.com ---
I also came across this bug.

The problematic method seems to be FormulaParser:parseSheetName.

In the patch I added unit tests which trigger this bug and also added a first
try for a fix.
Tested the fix for the file provided by max (by opening it in unit test and
shifting a row). Worked for me with fix.


Additional issue: In 'TestXSSFFormulaParser:testQuotedSheetNamesReference' I
also added a uncommented test-case, which does not work with or without the
fix. Problem there is also related to FormulaParser:parseSheetName. Additional
"'" get added around sheet-name. Since I am new to POI-library, I can not tell
if this is actually is a problem or not. 

Hope someone with more experience in this area, can resolve these issue(s).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66022] FormulaParseException: Parse error near char 0

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66022

--- Comment #5 from PJ Fanning <fa...@yahoo.com> ---
added patch with r1901162 - will see what happens with CI build before
proceeding with any further changes

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org