HTML に保存する際にダウンレベルの公開コメントを無効にする
Contents
[
Hide
]
HTML に保存する際にダウンレベルの公開コメントを無効にする
Excel ファイルが HTML に変換されると、Aspose.Cells は、出力 HTML ファイルにダウンレベルが明らかにされた条件付きコメントを追加します。これらの条件付きコメントは主に古いバージョンの Internet Explorer に関連しており、最新のブラウザーには関係ありません。ダウンレベルが公開された条件付きコメントの詳細については、次のリンクにアクセスしてください。
条件付きコメント - ダウンレベルで明らかにされた条件付きコメント
ダウンレベルが明らかにされた条件付きコメントを削除するには、Aspose.Cells がHtmlSaveOptions.DisableDownlevelRevealedComments財産。の設定HtmlSaveOptions.DisableDownlevelRevealedCommentsプロパティへ真実出力 HTML ファイルで、Downlevel-revealed 条件付きコメントを削除します。
次の図は、出力 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
source_directory = "Examples/SampleFiles/SourceDirectory/" | |
output_directory = "Examples/SampleFiles/OutputDirectory/" | |
# Load the Sample Workbook | |
workbook = Workbook(source_directory + "sampleDisableDownlevelRevealedComments.xlsx") | |
# Initialize HtmlSaveOptions | |
saveOptions = HtmlSaveOptions() | |
# Disable DisableDownlevelRevealedComments | |
saveOptions.setDisableDownlevelRevealedComments(True) | |
# Save the excel file. | |
workbook.save(output_directory + "outputDisableDownlevelRevealedComments_true.html", saveOptions) |