Dear All. with David's help I have been able to read that XLSX correctly and I will incorporate the following lines in SQLSHEET (XLSX JDBC driver) in order to avoid such problems in the future:
// @author David Law <david....@apconsult.de> private static final MathContext CTX_NN_15_EVEN = new MathContext(15, RoundingMode.HALF_EVEN); final String rawValue = xssfCell.getRawValue(); final BigDecimal rawBig = new BigDecimal(rawValue, CTX_NN_15_EVEN); double result = rawBig.doubleValue(); // returns 0.1066913 as expected Best regards Andreas On Sun, 2019-10-20 at 21:50 +0100, Nick Burch wrote: > On Sun, 20 Oct 2019, David Law wrote: > > the Cells have no Format. Take a look at the attached File, cell > > F10. Andreas tells me it was entered as 0.1066913 & that's how its > > displayed too, although it has no format. > > Numeric cells have a default format if nothing else is applied, it > could be that perhaps? > I know that David North did some work a few years ago on trying to > understand + match the Excel floating point rules, it might be worth > having a look at some of his mailing list posts for more details. He > isn't involved much in POI at the moment (day job priority changes), > but we can always ping him to chime in if needed! > Nick----------------------------------------------------------------- > ----To unsubscribe, e-mail: user-unsubscr...@poi.apache.org > For additional commands, e-mail: user-h...@poi.apache.org