Esporta DataBar, ColorScale e IconSet Formattazione condizionale durante la conversione da Excel a HTML
Contents
[
Hide
]
È possibile esportare la formattazione condizionale DataBar, ColorScale e IconSet durante la conversione del file Excel in HTML. Questa funzione è parzialmente supportata da Microsoft Excel ma Aspose.Cells la supporta completamente.
Esporta DataBar, ColorScale e IconSet Formattazione condizionale durante la conversione da Excel a HTML
Lo screenshot seguente mostra ilfile excel di esempio con formattazione condizionale DataBar, ColorScale e IconSet. Puoi scaricare ilfile excel di esempio dal link indicato.
Lo screenshot seguente mostra il file di output Aspose.Cells HTML che mostra la formattazione condizionale DataBar, ColorScale e IconSet. Come puoi vedere, sembra esattamente come ilfile excel di esempio.
Codice d’esempio
Il seguente codice di esempio converte il file excel di esempio in HTML che è normaleConversione 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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(ConvertingToHTMLFiles.class); | |
// Specify the file path | |
String filePath = dataDir + "Book1.xlsx"; | |
// Specify the HTML saving options | |
HtmlSaveOptions sv = new HtmlSaveOptions(SaveFormat.M_HTML); | |
// Instantiate a workbook and open the template XLSX file | |
Workbook wb = new Workbook(filePath); | |
// Save the HTML file | |
wb.save(dataDir + "output.html", sv); | |
// Print message | |
System.out.println("Excel to HTML conversion performed successfully."); |