Posted 26 October 2020, 11:07 am EST
Hello,
I’m using the Document for Excel (Java) to fill a document generated in the client side with SpreadJS.
Basically, the document creates two sheets, one where all the data will be putted, and another where the user can put some formulas to calculate the results based on the data in the first sheet.
In the second sheet, there are two results, one that calculates a summe (=SUM(Data!B5,Data!B6)), and another that, based on this summe, gives a feedback about this value (=IF(B2<50000000,“good”,“bad”)), where B2 is the result of the first forumla.
In the process where the Documents for excel put the needed values on the first sheet (“Data” sheet), and tries to save the excel to the Database, it throws a java.lang.NumberFormatException: For input string: “1,2868407174014E7”. This number is the one calculated in the B2 cell, and it raises this exception when trying to compare in the IF.
the complete stacktrace is:
For input string: "1,2868407174014E7"
java.lang.NumberFormatException: For input string: "1,2868407174014E7"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at java.lang.Double.valueOf(Double.java:502)
at com.grapecity.documents.excel.f.aR.b(Unknown Source)
at com.grapecity.documents.excel.f.S.a(Unknown Source)
at com.grapecity.documents.excel.f.S.a(Unknown Source)
at com.grapecity.documents.excel.k.i.n.e(Unknown Source)
at com.grapecity.documents.excel.j.k.e(Unknown Source)
at com.grapecity.documents.excel.f.a.h(Unknown Source)
at com.grapecity.documents.excel.k.f.d.a(Unknown Source)
at com.grapecity.documents.excel.j.k.a(Unknown Source)
at com.grapecity.documents.excel.j.f.b(Unknown Source)
at com.grapecity.documents.excel.j.h.a(Unknown Source)
at com.grapecity.documents.excel.g.f.u(Unknown Source)
at com.grapecity.documents.excel.B.ao.e(Unknown Source)
at com.grapecity.documents.excel.B.ao.b(Unknown Source)
at com.grapecity.documents.excel.l.b.P.a(Unknown Source)
at com.grapecity.documents.excel.l.b.P.a(Unknown Source)
at com.grapecity.documents.excel.l.b.P.a(Unknown Source)
at com.grapecity.documents.excel.l.b.O.a(Unknown Source)
at com.grapecity.documents.excel.l.b.O.a(Unknown Source)
at com.grapecity.documents.excel.Workbook.toJson(Unknown Source)