poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David North <dtn-...@corefiling.co.uk>
Subject Floating-point behaviour - difference between POI and Excel?
Date Mon, 02 Jun 2014 11:55:32 GMT
Consider the attached xlsx spreadsheet.

The value in sheet 1, cell A1, looks like this in the XML:


This is stripped down from a real spreadsheet supplied by one of my
users. I think that value was the result of a calculation.

Now, when opening the attached sheet in Excel 2010 or 2013, the UI shows
the value in cell A1 as:


No matter how I format it, the UI refuses to acknowledge or display the
.000000000007 in the underlying file.

However, when reading this cell using POI, getNumericCellValue returns


Is this correct?

If I enter the formula =62408-A1 in Excel, the value serialized is
<v>0</v>, which strongly suggests Excel is reading 62408 as the closest
number to the serialized data. So it would be ideal if POI did likewise.


David North, Technical Lead, CoreFiling Limited
Phone: +44-1865-203192

View raw message