Exportera DataBar, ColorScale och IconSet villkorlig formatering medan Excel till HTML konverterar
Contents
[
Hide
]
Du kan exportera DataBar, ColorScale och IconSet Conditional Formatting samtidigt som du konverterar din Excel-fil till HTML. Den här funktionen stöds delvis av Microsoft Excel men Aspose.Cells stöder den fullt ut.
Exportera DataBar, ColorScale och IconSet villkorlig formatering medan Excel till HTML konverterar
Följande skärmdump visarexempel på excel-fil med DataBar, ColorScale och IconSet Conditional Formatting. Du kan ladda nerexempel på excel-fil från den angivna länken.
Följande skärmdump visar Aspose.Cells-utdatafilen HTML som visar DataBar, ColorScale och IconSet Conditional Formatting. Som du kan se ser det precis ut somexempel på excel-fil.
Exempelkod
Följande exempelkod konverterar exemplet i Excel-filen till HTML, vilket bara är normaltExcel till HTML konvertering.
This file contains hidden or 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."); |