On 2018/10/09 12:39:39, "pj.fanning" <[email protected]> wrote: 
> Could you try using DataFormatter after using the FormulaEvaluator?
> 
> https://stackoverflow.com/questions/21538481/xssf-how-to-get-anything-as-string/21550258#21550258
> 
> 
> 
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 

The problem is deeper. Excel claims to be IEEE754 compatible but in fact 
coerces doubles to significant 15 digits at least before writing a value to a 
cell. When operands have differend magnitude, the highest order of magnitude is 
tracked, and lesser operands are coerced to that magnitude. Therefore, the 
output is not strictly IEEE754 compatible. 
To handle this in my private fork, I passed a PrecisionContext to all 
operations, tracked magnitude of operands and coerced the result through 
BigDecimal. But this is a significant change to the evaluation process, and I 
am not ready to present this fix right away.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to