Chart area is incorrect in PNG output of an excel chart



I am using Aspose.Cells v18.5 to generate PNG of chart - “chart1” in the attached excel file. The chart area is incorrect in the PNG output.

Following code is used to generate the output:

Workbook workbook = new Workbook(“test.xlsm”);
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = “Charts”;
Chart chart = ws.get(worksheetName).getCharts().get(“chart1”);
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
chart.toImage(“aspose response_18.5.png”, imgOptions);

It was working fine in Aspose.Cells v18.2.1. Since it is a break in functionality, this issue is very critical for us. Can you please look into this on priority and provide a fix for this asap.

PFA below the source excel and PNG output: (184.9 KB)




Thanks for the template file, sample code and screenshots.

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

I have tested your scenario/ case a bit using your sample code and template file, it works fine. Please find attached the output PNG file for your reference.
aspose response_18.6.x.png (10.1 KB)