On Mon, 2 Jun 2014, David North wrote:
The value in sheet 1, cell A1, looks like this in the XML:
<v>62408.000000000007</v>
Isn't floating point fun?
Now, when opening the attached sheet in Excel 2010 or 2013, the UI shows
the value in cell A1 as:
62408
No matter how I format it, the UI refuses to acknowledge or display the
.000000000007 in the underlying file.
What about if you set a format string of something like 0.000000000000000
? (I suspect the 62408 displayed is due to a format string of 0 or
General)
However, when reading this cell using POI, getNumericCellValue returns
62408.00000000001
Is this correct?
Quite possibly. What does DataFormatter give you if you ask for the
formatted String representation of the cell?
Also, if you save the file as a .xls, does that change how both POI and
Excel see it? (.xlsx and .xls use different ways of serialising numeric
values to disk)
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]