I'm using Apache POI 3.6. I've a column which is blank. I want it has to be read and then to the next cell. Even if I could resolve NullPointerException problem I could not get to the next cell.
Here's my code snippet :
HSSFCell cell = row.getCell(c);
String value = null;
switch (cell.getCellType()) {
case HSSFCell.CELL_TYPE_FORMULA:
value = "FORMULA value=" + cell.getCellFormula();
break;
case HSSFCell.CELL_TYPE_NUMERIC:
value = "NUMERIC value=" + cell.getNumericCellValue();
break;
case HSSFCell.CELL_TYPE_STRING:
value = "STRING value=" + cell.getStringCellValue();
break;
case HSSFCell.CELL_TYPE_BLANK:
value="";
break;
case HSSFCell.CELL_TYPE_ERROR:
value="error";
break;
default:
break;
}
System.out.println("CELL col=" + cell.getColumnIndex() + " VALUE=" + value);
If any one can resolve it, help me...