Esportazione dei commenti durante il salvataggio del file Excel in HTML
Possibili Scenari di Utilizzo
Quando salvi il file di Excel in HTML, i commenti non vengono esportati. Tuttavia, Aspose.Cells fornisce questa funzionalità utilizzando la proprietà HtmlSaveOptions.IsExportComments. Se la imposti su true, allora l’HTML mostrerà anche i commenti presenti nel tuo file di Excel.
Esporta commenti durante il salvataggio del file di Excel in HTML
Il codice di esempio seguente spiega l’uso della proprietà HtmlSaveOptions.IsExportComments. La schermata mostra l’effetto del codice sull’HTML quando è impostato su true. Puoi scaricare il file di esempio di Excel e l’HTML generato come riferimento.
Codice di Esempio
// 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); |