I am trying to read an excel file using POI. The first excel column is date(String type) and second is string.
So, my code is working fine if i do cell.getStringCellValue()
However, there is one particular row in the excel where both the columns are numeric type.
Hence I get :
java.lang.IllegalStateException: Cannot get a text value from a numeric cell
System.out.println(dateCell.getNumericCellValue());
System.out.println(ctrCell.getNumericCellValue());
It prints:
42360.0
0.3227586206896551
But in excel, I can see it as : 12/22/2015 and 32.2758620689655%
Kindly suggest how can I read the date as 12/22/2015 only instead of 42360.0 from the numerical cell.
Any help will be highly appreciated!!