Excel ファイルを HTML に保存する際にコメントをエクスポート
Contents
[
Hide
]
可能な使用シナリオ
Excel ファイルを HTML に保存する際、コメントはエクスポートされません。ただし、Aspose.Cells ではこの機能を HtmlSaveOptions.IsExportComments プロパティを使用して提供しています。true に設定すると、HTML に Excel ファイル内のコメントが表示されます。
Excel ファイルを HTML に保存する際にコメントをエクスポート
次のサンプルコードは、HtmlSaveOptions.IsExportComments プロパティの使用方法を説明しています。コードが true に設定されたときの HTML への影響を示すスクリーンショットです。参照には、サンプル 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-Java | |
// Load sample Excel file | |
Workbook wb = new Workbook(srcDir + "sampleExportCommentsHTML.xlsx"); | |
// Export comments - set IsExportComments property to true | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.setExportComments(true); | |
// Save the Excel file to HTML | |
wb.save(outDir + "outputExportCommentsHTML.html", opts); |