Save as HTML throws exception if "ExportImagesAsBase64" is set to "true" in Java

Hi,

Using Aspose Cells 19.6 for Java.

Sample code:

Workbook workbook = new Workbook("simple.xlsx");
WorksheetCollection worksheets = workbook.getWorksheets();
worksheets.setActiveSheetIndex(0);
HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.HTML);
saveOptions.setExportActiveWorksheetOnly(true);
saveOptions.setExportImagesAsBase64(true);
workbook.save(new ByteArrayOutputStream(), saveOptions);

Running the code above throws the following exception:

Exception in thread "main" com.aspose.cells.a.c.zb: 
	at com.aspose.cells.b.a.b.zi.d(Unknown Source)
	at com.aspose.cells.zail.a(Unknown Source)
	at com.aspose.cells.zail.a(Unknown Source)
	at com.aspose.cells.zail.f(Unknown Source)
	at com.aspose.cells.zail.d(Unknown Source)
	at com.aspose.cells.zail.f(Unknown Source)
	at com.aspose.cells.zaib.a(Unknown Source)
	at com.aspose.cells.zaib.a(Unknown Source)
	at com.aspose.cells.zaib.c(Unknown Source)
	at com.aspose.cells.zaib.a(Unknown Source)
	at com.aspose.cells.zaid.b(Unknown Source)
	at com.aspose.cells.zahz.a(Unknown Source)
	at com.aspose.cells.zaie.b(Unknown Source)
	at com.aspose.cells.zaie.a(Unknown Source)
	at com.aspose.cells.Workbook.a(Unknown Source)
	at com.aspose.cells.Workbook.save(Unknown Source)
	at <my code>

simple.zip (49.9 KB)

Kind regards,
Taras

Please also note that the same code works in Aspose Cells for Java version 17.11.6, which is the version from which we upgraded our OEM license.

@TarasTielkes,

Thanks for the template file and sample code.

After an initial test, I am able to reproduce the issue as you mentioned by using your sample code with template file. I have logged a ticket with an id “CELLSJAVA-42945” for your issue. The ticket is logged as following:
CELLSJAVA-42945 - Save as HTML throws exception if “ExportImagesAsBase64” is set

We will look into it soon.

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

@TarasTielkes,

This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-42945”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@TarasTielkes,

Please try our latest version/fix: Aspose.Cells for Java v19.6.3 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose_Cells_Java_v19.6.3.zip (6.5 MB)

The issues you have found earlier (filed as CELLSJAVA-42945) have been fixed in Aspose.Cells for Java 19.7. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi