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

Free Support Forum - aspose.com

"com.aspose.cells.CellsException: Invalid cell name" exception while converting XLSX to PDF

Hello,

I am getting below exception when I convert xlsx file to pdf. I am using appose total license with “aspose-cells-v22.3” version.

com.aspose.cells.CellsException: Invalid cell name
at com.aspose.cells.CellsHelper.a(Unknown Source)
at com.aspose.cells.CommentCollection.a(Unknown Source)
at com.aspose.cells.c4m.d(Unknown Source)
at com.aspose.cells.c4m.c(Unknown Source)
at com.aspose.cells.c4m.a(Unknown Source)
at com.aspose.cells.c7c.e(Unknown Source)
at com.aspose.cells.s5n.g(Unknown Source)
at com.aspose.cells.s5n.t(Unknown Source)
at com.aspose.cells.s5n.a(Unknown Source)
at com.aspose.cells.s6z.a(Unknown Source)
at com.aspose.cells.u1h.a(Unknown Source)
at com.aspose.cells.u1h.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)

Exception is thrown at below line:
Workbook workbook = new Workbook(sourceFilePath);

Please help me to understand the issue.

@dnyandevp,

Thanks for the stacktrace

To evaluate your issue precisely, we need your template file. Please zip and attach your template XLSX file here. We will check your issue soon.

When we open xlsx(which we want to convert) manually and try to save as, we got some errors attached to this post (might be the reason for pdf conversion failure).
And If we try to convert saved xlsx to PDF, it works OK without any exception.

Could you please go through attached error snap-shot and let us know that, if we bypass such errors while PDF conversion.Excel_SaveAs_Error.png (9.5 KB)

@dnyandevp,

Please try our latest version/fix: Aspose.Cells for Java v22.12 (Releases | Maven). I have tested your scenario/case with it, it works fine and as expected. I do not get any exception or other issue.

Let us know if you still find any issue with latest version/fix.

Could you please try xlsx to pdf conversion with attached excel file with this post? I am getting below exception:
exception “com.aspose.cells.CellsException: Invalid cell name”

Thanks…SampleExcel.zip (34.7 KB)

@dnyandevp,

It looks like you are still not using latest version/fix. Please try our latest version/fix: Aspose.Cells for Java v22.12 (Releases | Maven). I have tested your scenario/case with it, it works fine and as expected. I tested using the following sample code and it generates the PDF file fine. I do not get any exception or other issue.
e.g.
Sample code:

Workbook workbook = new Workbook("f:\\files\\SampleExcel.xlsx");
workbook.save("f:\\files\\out1.pdf");

Please find attached the output PDF for your reference.
out1.pdf (149.3 KB)

Let us know if you still find any issue with latest version/fix.