Hi,
When I read a numeric cell of my excel sheet using
apache poi, it returns wrong double value as described
below.
The cell has value = 27.99%
when I read this cell value using apache poi it gives
me 0.27990000000000004
for (short inxColumn = 0; inxColumn <
getColumnCount(); inxColumn++) {
// Add each cell to the row
iCellType = row.getCell(inxColumn).getCellType();
System.out.println("iCellType = " + iCellType);
switch (iCellType) {
case HSSFCell.CELL_TYPE_NUMERIC :
double d =
row.getCell(inxColumn).getNumericCellValue();
System.out.println("row.getCell(inxColumn).getNumericCellValue()
= "+d);
break;
.
.
.
.
.
.
.
}
}
I need the value as 27.99
Can anyone please tell what could be wrong?
Thanks
Office firewalls, cyber cafes, college labs, don't allow you to download
CHAT? Click here: http://in.messenger.yahoo.com/webmessengerpromo.php
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/