Reading string value from Excel with HSSF but it's double
- by egaga
Hi, I'm using HSSF-POI for reading excel data. The problem is I have values in a cell that look like a number but really are strings. If I look at the format cell in Excel, it says the type is "text". Still the HSSF Cell thinks it's numeric. How can I get the value as a string?
If I try to use cell.getRichStringValue, I get exception; if cell.toString, it's not the exact same value as in Excel sheet.
Thanks!
edit: until this gets resolved, I'll use new BigDecimal(cell.getNumericCellValue()).toString()