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 2020/04/11 10:37:44 UTC
[Bug 64341] New: Incorrect value returned for FormulaError after
evaluating formula cell
https://bz.apache.org/bugzilla/show_bug.cgi?id=64341
Bug ID: 64341
Summary: Incorrect value returned for FormulaError after
evaluating formula cell
Product: POI
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: MIDDHA.NISHANT173@GMAIL.COM
Target Milestone: ---
Created attachment 37169
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37169&action=edit
Spreadsheet for above test case.
1. I am using below attached excel file.
2. In below excel cell A1 contains formula "=G2-G5" which evaluates to zero.
3. On evaluating this cell using FormulaEvaluator, value for formula error must
be FormulaError._NO_ERROR but it is FormulaError.NULL
5. Apache POI version used is 3.17
4. Below mentioned is my code :
// Java Code
try {
// cell is instance of Cell A1
CellValue cellValue = formulaEvaluator.evaluate(cell);
formulaError = FormulaError.forInt(cellValue.getErrorValue());
System.out.println(formulaError);
System.out.println(cell.getCachedFormulaResultTypeEnum());
} catch (NotImplementedException ex) {
} catch (FormulaParseException ex) {
}
5. The output of the above-mentioned code is
NULL
NUMERIC
6. There is an ambiguity here result type is NUMERIC and formula error is
FormulaError.NULL but it should be FormulaError._NO_ERROR as formula
successfully evaluates to zero.
--
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 64341] Incorrect value returned for FormulaError on evaluating
formula cell
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64341
Nishant Middha <MI...@GMAIL.COM> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Incorrect value returned |Incorrect value returned
|for FormulaError after |for FormulaError on
|evaluating formula cell |evaluating formula cell
--
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 64341] Incorrect value returned for FormulaError on evaluating
formula cell
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64341
--- Comment #1 from chenlin <74...@qq.com> ---
Can you provide a complete test case? The code provided so far is so simple
that I can't even recreate what you're trying to express.
I try to write test cases based on this part of the code and file you provide,
but I never get what I expect.
--
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 64341] Incorrect value returned for FormulaError on evaluating
formula cell
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64341
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--
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