Html to excel

Hi,


upon evaluation of aspose.cells (.net) I try to convert html to xlsx. After reviewing your forums I noticed that you support this feature + support image data-uri (CELLSNET-40357). Was looking for example here.

so I have created a simple example where try to open html file (from disk) and after that try to save this file to the output stream. And got the problem that the image is not saved at all (all other fields looks good).

var loadOptions = new HTMLLoadOptions(LoadFormat.Html);
var workbook = new Workbook(“test.html”, loadOptions);
workbook.Save(outputStream, SaveFormat.Xlsx);

Attached html file and generated xlsx one. Could you please point me where is the problem here.

Thanks in advance.

Hi,


Thanks for providing us template files.

I have evaluated your scenario/ case a bit. I opened your template HTML file into MS Excel manually but it also does not show the image either, see the screenshot for your reference:
http://prntscr.com/e02ub5

If MS Excel cannot parse the image when opening the HTML file into it, Aspose.Cells also cannot render image when opening/rendering HTML file as it follows MS Excel standards and specifications for parsing/rendering HTML file format.

Thank you.

thanks for your answer. The problem was in width and height attributes in the img tag. By some reason after these attributes set image disappears…

Hi,


Good to know that your issue is sorted out now. Let us know if you have any issue or queries, we will be happy to assist you soon.

Thank you.