When I save a workbook to HTML, the CSS styles that use the format .x will be prefixed with the string specified in the HtmlSaveOptions.CellCssPrefix property. However, other styles in the format .font, .style, and td are not prefixed. When the HTML is embedded in a page with other content, the styles from the two sources corrupt each other.
var hso = new HtmlSaveOptions(SaveFormat.Html)
{
CellCssPrefix = “WS” + wsUniqueId + cells[firstRow, firstColumn].Name,
ExportActiveWorksheetOnly = true,
ExportDataOptions = HtmlExportDataOptions.All,
ExportFrameScriptsAndProperties = false,
ExportImagesAsBase64 = true,
HiddenColDisplayType = HtmlHiddenColDisplayType.Remove,
HiddenRowDisplayType = HtmlHiddenRowDisplayType.Remove,
HtmlCrossStringType = HtmlCrossType.Default,
};
And I’m saving the workbook to a MemoryStream.
Thank you