In HTML output of excel- 'colspan' attribute is wrongly used

Hello,


I am using Aspose.Cells v17.5 to generate HTML output of the attached excel file. In the Html output, ‘colspan attribute is used in some elements because of which its content spans across multiple columns. But the content of that is present in a single cell in the excel file, so in Html also it should come in a single column and ‘colspan’ attribute should not be used (Please see the attached screenshot).

Following code is used to generate the HTML:

Workbook workbook = new Workbook(“test.xlsx”);
workbook.save(“aspose response.htm”, new HtmlSaveOptions(SaveFormat.HTML));

Can you please look into this.

Thanks,
Neha

Hi,


Thanks for the template file, sample code and screenshot.

I have evaluated your scenario/case using your template file and observed this behavior via Aspose.Cells APIs. I, then evaluated your issue by converting your template Excel file to HTML (I saved your template file to “Web page” in MS Excel) manually in MS Excel. I checked the source of the output HTML file (by MS Excel) and found those ‘colspan’ attributes are also there with others. So, this is not an issue with Aspose.Cells APIs rather an expected behavior. Aspose.Cells follows MS Excel standards and specifications when rendering Excel to HTML files.

Thank you.

You can compare Excel generated and Aspose generated HTML source files in text editor which still shows the difference. Kindly fix.


Thanks,
Neha

Hi,


Yes, I again confirmed by opening your template file into MS Excel manually and then save it as “Web page” and found the same issue by checking the source in the editor. See the screenshot for your reference:
http://prntscr.com/fkis5v

Also, I have attached the output HTML file by MS Excel for your reference.

Thank you.