Free Support Forum - aspose.com

Custom datetime format not present when saving XLS to PDF


#1

I have an example file in both XLSX and XLS format (see attached). Both have the same contents which include custom date time formats. When I save the XLSX to PDF the custom formats appear as expected. Specifically rows 11 and 13. However, when I save the XLS to PDF some of the custom date time formats are not preserved in the resultant PDF. Is there a LoadOption or SaveOption I need to set? Or a Workbook setting? Any help would be appreciated.

I’m using Java 1.8.0_181 and Aspose Cells Java 18.12.
aspose-xls-pdf-ticket.zip (48.8 KB)


#2

@tucker.barbour,

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-42801 - Custom datetime format not present when saving XLS to PDF

#3

@tucker.barbour,

For XLS files, regional information may have been saved in the template file. In your file, the saved region is UnitedKingdom. So, when rendering the workbook loaded from it the used regional settings may be different from your environment and gives the unexpected result. To get the same result as the XLSX file, you should check the region of loaded workbook and reset it to the default or same with the environment before rendering.


#4

Thank you for the response. I also observed the locale set as en_GB in the XLS file whist the XLSX file locale is set to en_US. I was able to manually set the locale via the WorkbookSettings.setLocale and observed the expected behaviour in the renderer PDF. Thank you for your help.


#5

@tucker.barbour,

Good to know that your issue is sorted out. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.