Excel ファイルを HTML に保存する際にコメントをエクスポート
Contents
[
Hide
]
可能な使用シナリオ
ExcelファイルをHTMLに保存すると、コメントはエクスポートされません。ただし、Aspose.CellsはHtmlSaveOptions.IsExportCommentsプロパティを使用してこの機能を提供します。trueに設定すると、HTMLにExcelファイルに含まれるコメントも表示されます。
ExcelファイルをHTMLに保存する際にコメントをエクスポート
次のサンプルコードではHtmlSaveOptions.IsExportCommentsプロパティの使用方法を説明しています。コードによるHTMLへの影響を示すスクリーンショットがtrueとして設定されている場合に表示されます。参照用に、サンプルExcelファイルと生成されたHTMLをダウンロードしてください。
サンプルコード
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); |