We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

NumberFormatException for string with comma generated by formula


I’ve encountered a bug with number conversion. In the Excel document a cell is filled in with a formula which outputs a number. This number has a comma in it when Excel language is Dutch and a dot when Excel language is English. Some of my users use the Dutch language as their main computer language. The user in particular said the excel file hasn’t changed in a long time and he now suddenly get’s this error:
image.png (62.4 KB)

this is the user Excel sheet:
image.png (47.2 KB)

Any ideas?


Please try using our latest version of Aspose.Cells for Java 21.9.x (if you are not already using it). If you still find the issue, kindly do provide complete details and a simple Java program (runnable sample code) to reproduce the issue on our end. Also provide template Excel file(s).

PS. please zip the resource files prior attaching here.

We are not yet running the latest version (21.8) but we’ll try and upgrade it asap.
The Sample Code:

Workbook workbook = new Workbook( "D:\\Temp\\test.xlsx" ) ;
workbook.getSettings().setRegion( CountryCode.NETHERLANDS );
workbook.save( "D:\\Temp\\test.html", FileFormatType.HTML );

excel file.zip (131.1 KB)


Thanks for the file.

Please notice, I am able to reproduce the issue as you mentioned by using your sample code with your template file. I found an exception “java.lang.NumberFormatException: For input string” when rendering Excel file to HTML. I have logged a ticket with an id “CELLSJAVA-43903” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

1 Like

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Good to hear! Thanks for the fast response.


The issue is fixed in v21.10.1.
aspose-cells-21.10.1-java.zip (7.4 MB)

1 Like

Thanks for the fix! however we are using the Maven repository. Is there a possibility to get the latest version trough Maven?

Thanks in advance.

We upload the latest versions to Maven repositories once a month. You will get this fix in next month’s release from the Maven repositories.

1 Like

The issues you have found earlier (filed as CELLSJAVA-43903) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi