}
}
}
+
+ @Test
+ void testBug66181() throws IOException {
+ File file = XSSFTestDataSamples.getSampleFile("ValueFunctionOfBlank.xlsx");
+ try (
+ FileInputStream fis = new FileInputStream(file);
+ Workbook workbook = WorkbookFactory.create(fis)
+ ) {
+ Sheet sheet = workbook.getSheetAt(0);
+ Row row = sheet.getRow(0);
+ Cell a1 = row.getCell(0);
+ assertEquals(CellType.FORMULA, a1.getCellType());
+ assertEquals(CellType.ERROR, a1.getCachedFormulaResultType());
+ FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
+ CellValue cv1 = evaluator.evaluate(a1);
+ //this next line should probably return CellType.ERROR
+ assertEquals(CellType.NUMERIC, cv1.getCellType());
+ }
+ }
}
\ No newline at end of file