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

Free Support Forum - aspose.com

Date handling issue with 8.6.3 when converting from �XML Spreadsheet 2003� format to XLSX format

Dear Aspose support,

I have found that when converting to xlsx format from “XML Spreadsheet 2003” format, some dates can change after conversion, with the day and month values being exchanged if the day is <=12. This seems to be a regression in 8.6.3 - converting the same original file with 8.6.2 did not cause the same issue. I will attach a screenshot showing various cases as well as the sample file I used (in the cells, the month is on the left and the day on the right).

Can you try to convert the sample I provide here with 8.6.2 and 8.6.3 and see whether you can reproduce the issue ?

Best regards,

Aspose.Cells User.


Thank you for sharing the sample.

I have checked the presented scenario on my side while using the latest version of Aspose.Cells for Java 8.6.3 as well as 8.6.2. I am afraid, I am not able to replicate the said issue on my side with both revisions of the API, that is; date values in provided XML retain in the resultant XLSX format. Please review the attached screenshot showing the comparison as well as the resultant spreadsheets as attached. In order to further investigate the matter, could you please perform the conversion on your side while using the same sample attached to your original post (by downloading it from here) as I think we are using different samples for investigation. Moreover, my system’s region is set to USA with corresponding number/date formats. In case you have different region, please provide details so we could give this scenario another try on our end.

Thank you very much for trying to reproduce the issue.

I did not provide enough information, I apologize for this, I should have provided locale information as well.

We use the Japan location and the “Japanese (Japan)” format in windows “Region and language” options, which is a requirement for us as the document we generate are intended for Japanese clients.

Additionally, when doing the conversion with Aspose, I added some code to force a Japanese locale, because the conversion happens on a unix server with a US locale and we need Japanese formats by default. I realize now that there might be something wrong with how I do that currently. The code I use to do the conversion looks like :

InputStream is = ;

log.info("locale before forcing : "+Locale.getDefault());
log.info("locale after forcing : "+Locale.getDefault());

LoadOptions loadOptions = new LoadOptions();
Workbook wb = new Workbook(is,loadOptions);

wb.save(outputFile, SaveFormat.XLSX);

I observed the difference in the date between 8.6.2 and 8.6.3 by running that exact same code, I only swapped the Aspose jar and changed nothing else in my test case.

Can you see a difference in the generated documents in 8.6.2 and 8.6.3 when forcing Japanese locales ? Am I doing something wrong in my conversion code when using the load and workbook options ?

Thank you very much for your help, and again I’m sorry for the lost time caused by the lack of details in my previous report.

Thanks and regards,

Aspose.Cells User.


Thank you for providing the additional information.

We are currently performing the tests on Windows as well as Linux based OS with your code snippet, and we will shortly get back to you with updates in this regard.

Hi again,

This is to update you that we have performed several tests both on Windows as well as on Linux (CentOS) however, we are still not able to replicate the said issue on our side. Please note, on Windows platform, we have executed your exact code with system’s locale/region format set to English (United States) as well as Japanese (Japan). You can find the attachments for the spreadsheets generated with Aspose.Cells for Java 8.6.2 & 8.6.3.

As requested earlier, could you please download your sample from this post and try replicate the problem on your end against it? I am asking this because it feels that we are probably operating on different samples to investigate the issue. Moreover, are you setting any JVM arguments for the conversion process/program? If any, please provide details along with exact JDK version & vendor.

Thank you very much for your help and for trying to reproduce my issue. I’m sorry for the trouble trying to reproduce this issue.

The difference with the files I used and uploaded was intended to be only the character encoding of the xml file being shift-jis (cp932) or utf-8, the content being the same, and after opening the file with an InputStream, the same bytes are supposed to be returned except the encoding declaration in the xml header.

I have probably made a mistake and used a wrong file at some point or maybe I did not upload the right one - I will try to reproduce the issue from the file downloaded directly from here, and I will try to provide more detailed information about my configuration.

Dear Aspose Support team,

I did more testing on this, and I found out that after an update of my Java code, the issue disappeared and I could not reproduce it any more either. So there is an issue in the previous version of my code which caused Aspose to behave differently in 8.6.3.

my code version 006 + aspose 8.6.2 -> OK
my code version 006 + aspose 8.6.3 -> bug reproduced

my code version 007 + aspose 8.6.2 -> OK
my code version 007 + aspose 8.6.3 -> OK

Unfortunately I have not found what the difference is that caused the issue. I thought I was using my latest code, but maybe by mistake I have been using a previous version of my jar file where I was not forcing Japanese mode yet in the LoadOptions and WorkbookSettings as in the code snippet I provided previously.

I need to do more testing to fully understand what’s happening in which case, but at least it seems that I will not have problems with the latest version and my jar file and Aspose.Cells 8.6.3. I will post updates if I find further information that could be useful.

Thank you very much for your help again, and sorry for the trouble.

Best regards,

Aspose.Cells User.


It is good to know that you are up & running again. Please feel free to perform more tests, and contact us back in case you need our further assistance with Aspose APIs.