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 2015/02/04 21:06:31 UTC
[Bug 57535] New: Circular reference formulas cause "Unknown error
type: -60" when querying error value
https://issues.apache.org/bugzilla/show_bug.cgi?id=57535
Bug ID: 57535
Summary: Circular reference formulas cause "Unknown error type:
-60" when querying error value
Product: POI
Version: 3.11-FINAL
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: martin.studer@mirai-solutions.com
Created attachment 32432
--> https://issues.apache.org/bugzilla/attachment.cgi?id=32432&action=edit
File to reproduce the issue
See the attached Excel file minimal.xlsx where cells E4:E6 are involved in a
circular reference.
The cell type for the evaluated cell E6 is CELL_TYPE_ERROR. Trying to query
the error value yields an IllegalArgumentException "Unknown error type: -60".
See the following code to reproduce the issue:
Workbook wb = WorkbookFactory.create(new File("minimal.xlsx"));
FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator();
evaluator.clearAllCachedResultValues();
Sheet sheet = wb.getSheet("Sheet1");
Cell cell = sheet.getRow(5).getCell(4);
CellValue value = evaluator.evaluate(cell);
System.out.println(value.getCellType() == Cell.CELL_TYPE_ERROR); // true
CellUtils.getErrorMessage(value.getErrorValue()); // throws
IllegalArgumentException: Unknown error type: -60
--
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 57535] Circular reference formulas cause "Unknown error type:
-60" when querying error value
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57535
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
It seems we had two sets of error constants, one with a few more in than the
other
As of r1658190, I've made FormulaError be the main one, deprecated the other,
cleaned up ErrorEval to use only FormulaError, and added a unit test based on
your code which now passes!
--
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