Hello,
I am trying to read from Excel file, ans as know when the cell is complete text then it is String type and if numeric then Double.
The Problem i tried to read a cell (Street column) which have mixed value type (string and numeric) for example :Johann-Wax-Str. 6
I used to read the cell if String
and if Numeric
I supposed that the column Street (which is String & numeric) can be readed correctly with:
but that doesn't work, i get error
I looked up for proper Instruction in Poi documentation but i do'nt find solution to read cell which have String and numeric
So what the wrong and how to fix it?
I am trying to read from Excel file, ans as know when the cell is complete text then it is String type and if numeric then Double.
The Problem i tried to read a cell (Street column) which have mixed value type (string and numeric) for example :Johann-Wax-Str. 6
I used to read the cell if String
Code:
row.getCell(5).getStringCellValue()
Code:
Double.toString(row.getCell(6).getNumericCellValue()
Code:
Double.toString(row.getCell(6).getNumericCellValue()
Code:
java.lang.IllegalStateException: Cannot get a text value from a numeric cell
So what the wrong and how to fix it?