| Author |
NullPointerException in GetLastCellNum
|
puff li
Greenhorn
Joined: Jul 28, 2010
Posts: 22
|
|
Hi,
I am using Apache POI to access MS Excel. I am an 5 * 10 Excel data. But the getLastRowNum() method returns 19... and in the 6th row the method getLastCellNum() method returns 3.. and NullPointerException.
Also, if there data is a number, say 15, if I use getCellValue().toString(), it will display 15.00. If I change the cell type to string type, if I use getStringCellValue, if the data is 27.95, it will display some weird value like 27.9500034..
What is wrong??? Thanks.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32833
|
|
puff li wrote: . . . if the data is 27.95, it will display some weird value like 27.9500034..
What is wrong??? Thanks.
Nothing. That is normal behaviour for floating-point numbers (see No 20).
|
 |
 |
|
|
subject: NullPointerException in GetLastCellNum
|
|
|