Hi there,
I have an excel which contains conditional formatting in its cells.
Using the following code with Aspose.Cells v23.6 I export it as html
private static HtmlSaveOptions _htmlSaveOptions =>
new()
{
ExportImagesAsBase64 = true,
ExportPrintAreaOnly = true,
ExportHiddenWorksheet = false,
ExcludeUnusedStyles = true,
ExportActiveWorksheetOnly = true,
Encoding = Encoding.UTF8
};
public static void ExportHtml()
{
Workbook wbc = null;
using (FileStream ms = new FileStream(@"C:\demo-projects\aspose-html\input.xlsx", FileMode.Open))
{
wbc = new Workbook(ms, new LoadOptions(LoadFormat.Xlsx));
}
var worksheet = wbc.Worksheets[0];
using var html = new MemoryStream();
wbc.Save(html, _htmlSaveOptions);
File.WriteAllBytes(@"C:\demo-projects\aspose-html\output-23.6.html", html.ToArray());
wbc.Save(@"C:\demo-projects\aspose-html\output-23.6.xlsx", SaveFormat.Xlsx);
}
There’s a regression from Aspose.Cells v23.5:
In the output html, cells containing conditional formatting have a white background around them, which is not the styling in the original excel.
Attached is a zip file containing:
- input.xlsx - original input file.
- output-23.6 - html output using Aspose.Cell 23.6
- output-23.5 - html output using Aspose.Cell 23.5
input.zip (108.8 KB)
Thanks,
Shlomi