I use the Apache-POI "XSSF and SAX Event API" for Importing Excel-Files.
Im parsing Raw-Values with Apache-POI and want to ask, how can i round those Raw-Values exactly like the Excel-GUI does for the Cell-Editor. Following example illustrates the problem:
Raw: 1.9210999999999999E-2 (value is stored like this in xlsx-file)
Edit: 1.9211% (user sees this value in excel cell-editor)
View: 1.92% (user sees this value in excel grid-overview)
Format: 0.00% (the cell-style)
How does Excel read the Raw-Value to the Edit-Value ? How does Excel know that it needs to round to a fraction of 4 digits after the decimal-separator. How can Apache POI help me to do it the same, so i can also use the Edit-Value (and not the View-Value) in my Excel-Import?
I have seen a similar Ticket that covers how Excel does it: How does Excel successfully Rounds Floating numbers even though they are imprecise?
In this Ticket i want to ask, how can Apache POI help me so i do not need to reinvent the wheel here, and implement Excels Algorithm.