Deaktivieren von Downlevel Revealed Kommentaren beim Speichern als HTML

Beim Speichern als HTML-Wrap Kommentare ausblenden

Wenn eine Excel-Datei in HTML konvertiert wird, fügt Aspose.Cells Downlevel-revealed bedingte Kommentare in die Ausgabedatei ein. Diese bedingten Kommentare sind hauptsächlich für alte Versionen des Internet Explorers relevant und in modernen Browsern irrelevant. Für weitere Informationen zu Downlevel-revealed bedingten Kommentaren besuchen Sie bitte den folgenden Link

Bedingter Kommentar - Downlevel-revealed bedingter Kommentar

Um Downlevel-revealed bedingte Kommentare zu entfernen, bietet Aspose.Cells die Eigenschaft HtmlSaveOptions.DisableDownlevelRevealedComments an. Durch Setzen der Eigenschaft HtmlSaveOptions.DisableDownlevelRevealedComments auf True werden die Downlevel-revealed bedingten Kommentare in der Ausgabedatei entfernt.

Das folgende Bild zeigt die Downlevel-revealed bedingten Kommentare, die aus der Ausgabedatei entfernt werden

todo:image_alt_text

Beispielcode

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)