Closed djuju08 closed 5 years ago
Confirmed. With this xlsx the following test fails:
@Test
public void asBoolean() throws Exception {
try (InputStream is = openResource("/xlsx/simple.xlsx"); ReadableWorkbook wb = new ReadableWorkbook(is)) {
List<Boolean> cells = wb.getFirstSheet().openStream()
.flatMap(r -> r.stream())
.filter(c -> !CellType.EMPTY.equals(c.getType()))
.map(c -> c.asBoolean())
.collect(toList());
assertEquals(Arrays.asList(true,false), cells);
}
}
Self contained test using fastexcel writer and reader: https://github.com/rzymek/issue77 Also fails.
I think there is an issue with the getCellAsBoolean method of the Row.java class.
If a boolean value is set in the cell (TRUE or FALSE), the value retrieved by the library is always true.