We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting garbled output for excel assets when it is converted to html


we are using aspose cells for converting excel to html . we are getting garbled output when the attached excel is converted to html. see the attachment.

we are attaching input and output files for your reference.

Thanks & Regards,
Thirumurthy R


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

Please download and use the latest version: Aspose.Cells
for Java v7.5.1.4
it works fine.

We have converted your file using the following code with the latest version and it converted the files into html successfully.

We have attached the output files for your reference.


String filePath=“F:/Shak-Data-RW/Downloads/Excel/Document_07.xlsx”;

Workbook workbook = new Workbook(filePath);

workbook.save(filePath + “.out.html”, SaveFormat.HTML);


We are using the following code:
Workbook doc = new Workbook(“C:\test\source.xls”);
com.aspose.cells.PdfSaveOptions saveOptions = new com.aspose.cells.PdfSaveOptions();
doc.save(“c:\test\output.pdf”, saveOptions);

If we do not pass saveOptions as an argument to save method, we do not get garbled output.

I want to understand if there is a change in latest binaries or for html conversion we should not be passing this?


Hi Shikha,

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

Since, you want to get html output, so you should pass HtmlSaveOptions instead of PdfSaveOptions. PdfSaveOptions is used only when you want to get the pdf output.

In this case, you are saving the pdf output in html file, therefore you are getting garbled output. The correct code should look like this.


String filePath = “F:\Shak-Data-RW\Downloads\Excel\Document_07.xlsx”;

Workbook doc = new Workbook(filePath);

HtmlSaveOptions opts = new HtmlSaveOptions();

doc.save(filePath + “.out.html”, opts);