Export Comments while Saving Excel file to HTML
Contents
[
Hide
]
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.
Sample Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |