Well, Aspose.Cells can only convert HTML files (MS Excel oriented) which are generated with Ms-Excel or by itself. It cannot convert every HTML file to XLS/XLSX file format. Please see the sample code below. e.g
Sample code:
string path = “Book1.htm”;
Workbook workbook = new Workbook(path);
workbook.Save(“out1.xlsx”, SaveFormat.XLSX);
Also, we provide Cell.HtmlString attribute that you may try to use to parse HTML tags/ script.
Anyways, we have already logged a ticket with an id “CELLSNET-41627” as a New Feature Request in our database for the feature (i.e…, Convert HTML table with formatting into Excel). We will look into it and implement it if possible.
Once we have any update on it, we will let you know here.
We have an API named Aspose.Pdf for .NET which provides the feature to create as well as manipulate existing PDF files. It offers the feature to load HTML file and save the output in PDF format or save it as MS Word file or MS Excel worksheet. So as per your requirement, you may consider loading HTML file and try saving it as XLS format. Please take a look over following code snippet.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.