poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <acoli...@buni.org>
Subject Re: Numeric Cell Type not consistent
Date Thu, 01 Mar 2007 17:37:31 GMT
You do realize that floating point numbers are always approximates?  
Both of the numbers below
are "correct" ;-)
>>
>>     
> Are you sure this is not a bug of POI? This is not a random problem. It
> always does so for the file. Also I can't enforce the decimal places. 
> Also when I save as CSV and then back to XLS, this doesn't happen.
>
> I debugged a little and figure out that the LittleEndian.getDouble(final
> byte[] data, final int offset) method returns different long bits value
> (one last digit is different), 4562254508917369340 (Corrent) and
> 4605101755772172238 (Wrong), which is pass to the Double to get the
> double value.
>
> I have attached the sample file so that the problem can be reproduced. 
> This file is created with the open office 2 by copying paste cells from
> the problematic ms excel xp file.
>
> Takahiro
>   
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


-- 
No PST Files Ever Again
Buni Meldware Communication Suite
Email, Calendaring, ease of configuration/administration
http://buni.org


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Mime
View raw message