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

Free Support Forum - aspose.com

Date formatting in Excel to HTML rendering

Convert Effect Problem! The date is not right!
QQ20181108-133152@2x.png (617.0 KB)
各职能部门第四季度生产经营工作目标.xlsx.zip (41.7 KB)
src.zip (1.6 KB)

@hucq_landray_com_cn,

Thanks for your query.

Could you please mention the name of worksheets and output files where this problem is occurring, so that we can take care of all occurrences.

can you use our source code to convert it?and see the effect!

@hucq_landray_com_cn,

We have used your code but generated file contains many worksheets and lot of data. Please explain and mention name of specific worksheets and cell address where issue occurs so that we can fix the problem completely.

QQ20181108-133152@2x.png (617.0 KB)

@hucq_landray_com_cn,

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-42756 - Date is not right

@hucq_landray_com_cn,

We have tested the scenario at our end with different locales. If the regional settings of my machine is set as en_US, then the MS Excel displays the date as 12/31/2018, and in the generated HTML by our component it is 12/31/2018 too. When I changed the region of my machine to zh_CN, then the MS Excel displays the date as 2018/12/31, and in the re-generated HTML by our component it became 2018/12/31 too. Please see the screenshots of my test result, where, the left is what displayed by MS Excel, and the right is what shown in our generated HTML file.
en_US.png (6.8 KB)
zh_CN.png (16.5 KB)

Could you please check your locale settings with below Java code and let us know your feedback with screenshots.

Locale currentLocale = Locale.getDefault();
System.out.println(currentLocale.getLanguage());
System.out.println(currentLocale.getCountry());