Excel ファイルを HTML に保存する際にコメントをエクスポート

可能な使用シナリオ

ExcelファイルをHTMLに保存すると、コメントはエクスポートされません。ただし、Aspose.CellsはHtmlSaveOptions.IsExportCommentsプロパティを使用してこの機能を提供します。trueに設定すると、HTMLにExcelファイルに含まれるコメントも表示されます。

ExcelファイルをHTMLに保存する際にコメントをエクスポート

次のサンプルコードではHtmlSaveOptions.IsExportCommentsプロパティの使用方法を説明しています。コードによるHTMLへの影響を示すスクリーンショットがtrueとして設定されている場合に表示されます。参照用に、サンプルExcelファイル生成されたHTMLをダウンロードしてください。

todo:image_alt_text

サンプルコード

// 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);