Esporta commenti durante il salvataggio del file Excel in HTML
Contents
[
Hide
]
Esporta commenti durante il salvataggio del file Excel in HTML
Quando Excel viene convertito in HTML, i commenti non vengono esportati. Aspose.Cells for Python via Java fornisce la funzione per esportare i commenti durante la conversione da Excel a HTML. Per raggiungere questo obiettivo, lo API fornisce ilHtmlSaveOptions.IsExportCommentsproprietà. Impostazione del valore diHtmlSaveOptions.IsExportComments proprietà aVero esporterà i commenti nell’output HTML.
Lo screenshot seguente mostra il file di output HTML generato dal frammento di codice di esempio.
Il codice di esempio seguente illustra l’esportazione dei commenti durante la conversione da Excel a 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 + "sampleExportCommentsHTML.xlsx") | |
# Initialize HtmlSaveOptions | |
saveOptions = HtmlSaveOptions() | |
saveOptions.setExportComments(True) | |
# Save the excel file. | |
workbook.save(output_directory + "outputExportCommentsHTML.html", saveOptions) |