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

Free Support Forum - aspose.com

HTML To Excel - Missing Styles

When I try to Open & Save an HTML file as Excel in XLSX format, it looses the color and border formatting. How can I fix it? Please see my code below -

string htmlContent = System.IO.File.ReadAllText(TemplateFilePath);
htmlContent = htmlContent.Replace("##TABLECONTENT##", “

System.IO.File.WriteAllText(TemplateFilePath, htmlContent);

using (FileStream fileStream = new FileStream(TemplateFilePath, FileMode.Open))
HTMLLoadOptions options = new HTMLLoadOptions(LoadFormat.Html);
Workbook wb = new Workbook(fileStream, options);
wb.Save(Path.Combine(OutputFilePath, ReportFileName), SaveFormat.Xlsx);

Hi Kavita,

Thank you for sharing the samples.

We have evaluated the presented scenario while using the latest revision of Aspose.Cells for .NET, and we are able to replicate the said issue on our side, that is; cell styling is missing while exporting the HTML to XLSX file format. We have logged this incident as CELLSNET-44181 in our bug tracking system for review by the product team. Please spare us some time for proper analysis. In the meanwhile, we will keep you posted with updates in this regard.