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: [email protected]
Reporter: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]