Reputation: 99
I wish to display the values from Excel. My issue is I am not sure why I am getting "null" as well.
Upvotes: 1
Views: 2703
Reputation: 164
You're getting the cell object. Do a null-check and access the value of the cell - something like this:
Cell cell = rowAmt.getCell(0);
if (cell != null) {
System.out.println(cell.getStringCellValue());
/*
* for numbers: cell.getNumericCellValue();
* for booleans: cell.getBooleanCellValue();
*/
}
Upvotes: 2