I\'m trying to consume data from a spreadsheet in Excel, but always of this error, already tried formatting the worksheet to text and number and still the error persists.
If you are processing in rows with cellIterator....then this worked for me ....
DataFormatter formatter = new DataFormatter();
while(cellIterator.hasNext())
{
cell = cellIterator.next();
String val = "";
switch(cell.getCellType())
{
case Cell.CELL_TYPE_NUMERIC:
val = String.valueOf(formatter.formatCellValue(cell));
break;
case Cell.CELL_TYPE_STRING:
val = formatter.formatCellValue(cell);
break;
}
.....
.....
}