Esporta commenti durante il salvataggio del file Excel in HTML
Contents
[
Hide
]
Possibili scenari di utilizzo
Quando salvi il tuo file Excel in HTML, i commenti non vengono esportati. Tuttavia, Aspose.Cells fornisce questa funzione utilizzando ilHtmlSaveOptions.IsExportComments proprietà. Se lo impostiVEROquindi HTML visualizzerà anche i commenti presenti nel file Excel.
Esporta commenti durante il salvataggio del file Excel in HTML
Il seguente codice di esempio spiega l’utilizzo diHtmlSaveOptions.IsExportCommentsproprietà. Lo screenshot mostra l’effetto del codice sullo HTML quando è impostato suVERO . Si prega di scaricare ilesempio di file Excel e ilgenerato HTML per un riferimento.
Codice d’esempio
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-.NET | |
//Load sample Excel file | |
Workbook wb = new Workbook(sourceDir + "sampleExportCommentsHTML.xlsx"); | |
//Export comments - set IsExportComments property to true | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.IsExportComments = true; | |
//Save the Excel file to HTML | |
wb.Save(outputDir + "outputExportCommentsHTML.html", opts); |