Error occurs when converting table to PNG


I am using Aspose.Cells v18.5 to generate PNG of table- “table1” in the attached excel file. Following exception occurs while generating the PNG:

com.aspose.cells.CellsException: Can’t add attribute to 0-length text
at com.aspose.cells.zcap.a(Unknown Source)
at com.aspose.cells.zcap.a(Unknown Source)
at com.aspose.cells.zcap.a(Unknown Source)
at com.aspose.cells.SheetRender.toImage(Unknown Source)

This issue seems to be a break in functionality. It used to work fine till some previous version of aspose.cells.

PFA below the source excel and sample code to generate the PNG: (10.3 KB)

Can you please analyse this issue.



Thanks for the template file and sample code.

After an initial test, I am able to observe the issue as you mentioned by using your sample code with your template file. I found an exception “com.aspose.cells.CellsException: Can’t add attribute to 0-length text” when rendering worksheet to PNG file format.

I have logged a ticket with an id “CELLSJAVA-42678” for your issue. We will look into it soon.

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


Please try our latest version/fix: Aspose.Cells for Java v18.7.1.

Your issue should be fixed in it.

Let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-42678) have been fixed in Aspose.Cells for Java 18.8. You can also get the latest Aspose.Cells for Java version from Maven repos. with simple configurations. Please see the document for your reference: Installation|Documentation

This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi