Graphic in print area not exported

Hello,

I’m having problems when exporting HTML from an Excel file.
In my worksheet, I defined a print area that contains data and a chart, but the chart does not appear in the HTML file.
I’ve done different tests but I can’t figure out where it’s coming from, sometimes the graphic appears although it’s not entirely in the print area, other times it doesn’t appear although the area around is very large.
Could you help me know where this could be coming from?

Thanks in advance for your help, regards,

Charlie

@cdelanneau,

Could you please zip and attach your template Excel file and output HTML. Also, share sample code that you are using to reproduce the issue. We will check your issue soon.

Hello,

Thank-you for your prompt response.

Here are three examples I made, the files are the same, only the print area changes:
tests.zip (110.0 KB)

And here is the code I used to generate these files:
try {
String[] filesToConvert = new String[] {“tests/test_excel_vente_composants_test_graphiques.xlsx”, “tests/test_excel_vente_composants_test_graphiques_2.xlsx”, “tests/test_excel_vente_composants_test_graphiques_3.xlsx”};
for (String excelFileName : filesToConvert) {
Workbook wb = new Workbook(excelFileName);
HtmlSaveOptions options = new HtmlSaveOptions();
options.setExportPrintAreaOnly(true);
options.setExportImagesAsBase64(true);
ImageOrPrintOptions imageOptions = options.getImageOptions();
imageOptions.setSaveFormat(SaveFormat.SVG);
wb.save(excelFileName.substring(0, excelFileName.length() - 5) + “.html”, options);
}
} catch (Exception e) {
e.printStackTrace();
}

Thanks!

@cdelanneau,

Thanks for the template files.

Please notice, I am able to reproduce the issue as you mentioned by converting your template files to HTML file format. I found graphic in print area are not exported in Excel to HTML conversion. I have logged a ticket with an id “CELLSJAVA-44534” for your issue. We will look into it soon.

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

1 Like

Hi,

Thank you for your reply and the speed of your support.
I await your feedback on this ticket.

Regards,

Charlie

@cdelanneau,

You are welcome.
We will keep you posted with updates (once available) on it.

@cdelanneau,

This is to inform you that your issue (logged earlier as “CELLSJAVA-44534”) has been resolved now. The fix will be included in the next release (Aspose.Cells for Java v22.5) which is scheduled in the second week of May 2022. You will also be notified when the next version is released.

Hi,

Thanks for your feedback, I’m waiting for the release of the next version to test the resolution of this issue.

Regards,

Charlie

@cdelanneau,

Sure, we will keep you posted with updates on it.

The issues you have found earlier (filed as CELLSJAVA-44534) have been fixed in this update. This message was posted using Bugs notification tool by Peyton.Xu