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

Free Support Forum - aspose.com

CellsException: null when saving Excel document to PDF


When I try to convert the attached Excel document to PDF, I get the following exception:

Caused by: com.aspose.cells.CellsException: null
at com.aspose.cells.zbzd.a(Unknown Source)
at com.aspose.cells.zbzd.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)

Here is the code I use:

Workbook workbook = new Workbook(“Report for Dasovich Problem #2.xls”);
PdfSaveOptions saveOptions = new PdfSaveOptions(SaveFormat.PDF);
workbook.save(“Report for Dasovich Problem #2.pdf”, saveOptions);

Can you check it please? See the sample file attached. I can open the document using MS Excel fine.

I tried the latest version Aspose.Cells 16.10.0.

Hi Igor,

Thank you for sharing the sample.

I have raised the said problem with the product team under the ticket CELLSJAVA-42066 for further investigation and correction purposes. Please spare us little time for proper analysis. In the meanwhile, we will keep you posted with updates in this regard.

Thanks for using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for Java v16.11.1 and let us know your feedback.

Hi Shakeel,

Thanks for the update. The fix worked fine.

I have found another Excel document that produces the same exception when converting to PDF. The fix didn’t work for that file. Can you check it too please? See the file attached.

Hi Igor,

Thank you for the confirmation on fix. Regarding your recently shared sample, it seems to be corrupted and possibly infected. Please check the attached snapshot showing the Excel error not to edit it. Please note, in case of corrupted/infected samples, Aspose.Cells APIs can throw various exception. In this scenario, I can observe NullPointerException, however, I can raise it with the product team due to the reason shared above.

Hi Babar,

It’s ok, the ticket can be close then. Thanks!

Hi Igor,

Thank you for your understanding. Please feel free to contact us back in case you need our further assistance with Aspose APIs.

The issues you have found earlier (filed as CELLSJAVA-42066) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.