We were not able to replicate your mentioned issue with the latest version: Aspose.Cells for Java 8.2.2. We opened your file and saved it using Aspose.Cells and it did not generated any exception.
Please let us know your run results with the latest version. If your issue still occurs, then please provide us your runnable sample code replicating the exception and the source Excel files used in your code. We will investigate it by running it our end and log it in our database if we found any bug.
Please provide us a simplest code which should not be more than few lines because it will help us replicating and fixing the issue more rapidly.
Please note, we do not provide fixes to older versions, we only provide fixes based on the latest versions only. So if the issue is not replicated with the latest version, then it means it is already fixed, so you need to use the latest version in that case. In case, the issue still occurs with the latest version, we will provide a fix for it in next versions.
We were able to observe the exception after executing the following code using the older version (v7.2.2), the latest version works fine though.
We have logged this issue in our database for investigation. And we will let you know why this exception occurred and what you could do to avoid the exception.
This issue has been logged as
CELLSJAVA-41058 - java.lang.NumberFormatException: For input string: "0,001"
Exception: Exception in thread “main” java.lang.NumberFormatException: For input string: “0,001” at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at java.lang.Double.parseDouble(Unknown Source) at com.aspose.cells.b.a.o.a(Unknown Source) at com.aspose.cells.ahs.E(Unknown Source) at com.aspose.cells.aal.f(Unknown Source) at com.aspose.cells.aal.a(Unknown Source) at com.aspose.cells.aaj.h(Unknown Source) at com.aspose.cells.aaj.a(Unknown Source) at com.aspose.cells.aai.a(Unknown Source) at com.aspose.cells.Workbook.a(Unknown Source) at com.aspose.cells.Workbook.a(Unknown Source) at com.aspose.cells.Workbook.(Unknown Source) at ClsAsposeTest.f1(ClsAsposeTest.java:399)
We have evaluated your issue further. For your issue “CELLSJAVA-41058”, it is caused by the fact that this file’s calculation setting of Iteration is true and the value of “Maximum change” to be saved as localized string by old versions of cells component. When the decimal separator is ‘,’ instead of ‘.’,
this error will be caused by it. To solve it with the old versions, there are two
options:
One is to change the default locale of the Java application to one whose decimal separator is ‘.’, such as en-US.
e.g. Sample code:
Workbook workbook = new Workbook(...);
...
Locale.setDefault(Locale.US);
...
workbook.save(resultfile);
workbook = new Workbook(resultfile);
...
Another option is to set the Iteration setting as false before saving the workbook:
e.g. Sample code:
Workbook workbook = new Workbook(...);
...
workbook.getSettings().setIteration(false);
...
workbook.save(resultfile);
workbook = new Workbook(resultfile);
...
Hopefully, the solution provided by us will enable you to use the older version without any issue. In case, you find any other question or face any other issue, please feel free to post on our forums, we will be glad to look into it and help you asap.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.