https://bz.apache.org/bugzilla/show_bug.cgi?id=65963
Bug ID: 65963
Summary: Name confused with column reference
Product: POI
Version: 5.2.0-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Hello,
I have this name definitions in the attached file:
- Iso.1.Con.Vol.Change=Sheet1!$A$1
- Saturation.Post.Volume=Sheet1!$A$3
In cell A5, I have this formula
=Iso.1.Con.Vol.Change/Saturation.Post.Volume
When I try to evaluate the formula from that cell using
org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator
* formulaEvaluator.evaluate(cell);
A FormulaParseException is thrown with this message:
* Dotted range (full row or column) expression 'Iso.1' must have exactly 2
dots.
I've been debugging and it seems that FormulaParser.parseSimpleRangePart()
calls
* CellReference.isColumnWithinRange(String colStr, SpreadsheetVersion
ssVersion)
Which thinks that ISO is a column name because it has 3 letters, same as the
last column.
Since Iso is not followed by 2 dots, it should somehow check if a valid
reference follows?
BTW Saturation.Post.Volume is correctly read, because "Saturation" contains
more than 3 letters.
Reading cell B5 works just fine:
=A1/Saturation.Post.Volume
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]