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

Free Support Forum - aspose.com

Conditional Formatting not getting Transferred to PDF

Hello, I am doing a POC for a Customer in Germany. I am currently using the Trial Version for the same. If everything goes right the customer is going to purchase the license.
I have a Excel Sheet with predefined Conditional Formatting. After reading the Data from the Customer System I am filling the data in the Sheet and at the end I am creating the PDF.

The conditional formatting are correctly visible in Excel. But they are not visible in PDF. Can you please help.
Excel-PDF.png (7.5 KB)

The entire code is written in JAVA.


Please zip your sample Excel file (with predefined Conditional Formatting) and attach it here, we will check it soon. Also paste your sample code (runnable) that you are using to generate the PDF file.

Hello, Thanks for your reply. In the attached ZipFile you will find the Excel and PDF. I am using only workBook.save(pdfFileName, FileFormatType.PDF); to generate the PDF.02072020.zip (301.2 KB)

Please let me know if you need anything else.



Thanks for the template file.

Please notice, we were able to reproduce the issue as you mentioned by converting your template file to PDF file format. We found conditional formatting not rendered to PDF. We have logged a ticket with an id “CELLSJAVA-43235” for your issue. We will look into it soon.

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

Hello, Thanks a lot for your response. Looking forward for your updates.



Sure, we will keep you posted with updates on your issue.

Values saved in the template file for those cells with conditional formatting are incorrect. Formulas should be re-calculated to get the correct value. So, you need to add code:


before saving the pdf file.

Let us know your feedback.

Hello, Thanks a lot for your reply.
Your solution is working fine.


Good to know that your issue is resolved by the suggested line of code. 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.