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

Hi,

we are using aspose cells 7.5.0.3 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

Hi,

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.

Java


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


Workbook workbook = new Workbook(filePath);


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

Hi,

We are using the following code:
Workbook doc = new Workbook(“C:\test\source.xls”);
com.aspose.cells.PdfSaveOptions saveOptions = new com.aspose.cells.PdfSaveOptions();
saveOptions.setImageType(ImageFormat.getPng());
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?

Thanks,
Shikha

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.

Java


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);