Export Comments while Saving Excel file to HTML

Possible Usage Scenarios

When you save your Excel file into HTML, comments are not exported. However, Aspose.Cells provides this feature using the HtmlSaveOptions.IsExportComments property. If you set it true, then HTML will also display comments present in your Excel file.

Export Comments while Saving Excel file to HTML

The following sample code explains the usage of HtmlSaveOptions.IsExportComments property. The screenshot shows the effect of the code on the HTML when it is set to true. Please download the sample Excel file and the generated HTML for a reference.

todo:image_alt_text

Sample Code

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
//Load sample Excel file
Workbook wb = new Workbook(sourceDir + "sampleExportCommentsHTML.xlsx");
//Export comments - set IsExportComments property to true
HtmlSaveOptions opts = new HtmlSaveOptions();
opts.IsExportComments = true;
//Save the Excel file to HTML
wb.Save(outputDir + "outputExportCommentsHTML.html", opts);