Excel ファイルを HTML に保存する際にコメントをエクスポート
Contents
[
Hide
]
可能な使用シナリオ
ExcelファイルをHTMLに保存するとコメントはエクスポートされませんが、Aspose.Cells for Python via .NETはHtmlSaveOptions.is_export_commentsプロパティを使用してこの機能を提供します。これをtrueに設定すると、Excelファイル内のコメントもHTMLに表示されます。
ExcelファイルをHTMLに保存する際にコメントをエクスポート
次のサンプルコードではHtmlSaveOptions.is_export_commentsプロパティの使用方法を説明しています。コードによるHTMLへの影響を示すスクリーンショットがtrueとして設定されている場合に表示されます。参照用に、サンプルExcelファイルと生成されたHTMLをダウンロードしてください。
サンプルコード
This file contains hidden or 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
# Load the Sample Workbook | |
workbook = Workbook("Book1.xlsx") | |
# Initialize HtmlSaveOptions | |
saveOptions = HtmlSaveOptions() | |
saveOptions.is_export_comments = True | |
# Save the excel file. | |
workbook.save("outputExportCommentsHTML.html", saveOptions) |