<changes>
<release version="3.6-beta1" date="2009-??-??">
+ <action dev="POI-DEVELOPERS" type="fix">24601 - fix fetching of error codes from XSSF formula cells</action>
<action dev="POI-DEVELOPERS" type="fix">48229 - fixed javadoc for HSSFSheet.setColumnWidth and XSSFSheet setColumnWidth </action>
<action dev="POI-DEVELOPERS" type="fix">47757 - fixed XLSX2CSV to avoid exception when processing cells with multiple "t" elements</action>
<action dev="POI-DEVELOPERS" type="add">48195 - short-circuit evaluation of IF() and CHOOSE()</action>
* @see FormulaError
*/
public String getErrorCellString() {
- int cellType = getCellType();
+ int cellType = getBaseCellType(true);
if(cellType != CELL_TYPE_ERROR) throw typeMismatch(CELL_TYPE_ERROR, cellType, false);
return _cell.getV();
//make sure we return null for that instead of throwing OutOfBounds
assertEquals(null, cell.getCellStyle());
}
+
+ /**
+ * Cell with the formula that returns error must return error code(There was
+ * an problem that cell could not return error value form formula cell).
+ */
+ public void testGetErrorCellValueFromFormulaCell() {
+ XSSFWorkbook wb = new XSSFWorkbook();
+ XSSFSheet sheet = wb.createSheet();
+ XSSFRow row = sheet.createRow(0);
+ XSSFCell cell = row.createCell(0);
+ cell.setCellFormula("SQRT(-1)");
+ wb.getCreationHelper().createFormulaEvaluator().evaluateFormulaCell(cell);
+ assertEquals(36, cell.getErrorCellValue());
+ }
}