Malformed pattern when render to image

I tried to render my sheet to image and I got following exception:

com.aspose.cells.CellsException: Malformed pattern "#'"
at com.aspose.cells.SheetRender.toImage(Unknown Source)

Could you please help me? Excel file enclosed.


Thanks for your posting and using Aspose.Cells for Java.

Please download and try the latest version:
for Java v7.3.0.4

I have tested your file against this version and found it is working fine.


Thanks for the file.

Please try our latest fix/version: Aspose.Cells for Java v7.3.0.4

I have tested with it using your file and it works fine. I can generate the image fine. Here is my sample code:

Sample code:

Workbook book = new Workbook("malformed_exception.xlsx");
//Define ImageOrPrintOptions
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
//Set the vertical and horizontal resolution
//Set the image's format
//One page per sheet is enabled
//Get the first worksheet
Worksheet sheet = book.getWorksheets().get(0);
//Render the sheet with respect to specified image/print options
SheetRender sr = new SheetRender(sheet, imgOptions);
//Render the image for the sheet

If you still find any issue, kindly do provide your sample code to reproduce the issue on our end.

Thank you.

Moving to latest Cells version has solved the issue. Thank you


Thanks for your feedback.

It’s good to know that your issue is resolved. If you face any other issue, please feel free to let us know, we will be glad to help you asap.