Yellow colored cells does not return values as it displayed. It seems that the value is integer in excel, but actual value in POI is a double number. There's no formula, displaying options in the cell at all.
Here's the code that verifies acutal value.
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
File file = new File("newSCIS.xlsx");
Workbook workbook = WorkbookFactory.create(file);
Sheet sheet = workbook.getSheetAt(0);
for (int i = 1; i <= 6; i++) {
Row row = sheet.getRow(i);
Cell cell = row.getCell(1);
cell.setCellType(CellType.STRING);
String value = cell.getStringCellValue();
System.out.printf("%20s \n", value);
}
Why is this happening?