Exclude Unused Styles during Excel to HTML conversion

Exclude Unused Styles during Excel to HTML conversion

Microsoft Excel files may contain many unused styles. When these files are exported to HTML format, the unused styles are also exported. This results in the increased size of the output HTML. Aspose.Cells for Python via Java supports excluding these styles during the conversion of Excel file to HTML. For this, the API provides the HtmlSaveOptions.ExcludeUnusedStyles property. Setting the value of HtmlSaveOptions.ExcludeUnusedStyles property to True will exclude all unused styles from the output HTML.

The following screenshot shows unused styles in the HTML file which will be removed by setting the value of HtmlSaveOptions.ExcludeUnusedStyles property to True.

todo:image_alt_text

The following sample code demonstrates removing unused styles during Excel to HTML conversion.