在将Excel转换为HTML时,导出数据条、颜色刻度和图标集条件格式

在将Excel转换为HTML时,导出数据条、颜色刻度和图标集条件格式

以下截图显示了带有数据条、颜色刻度和图标集条件格式的sample excel file。您可以从给定链接下载sample excel file

todo:image_alt_text

以下截图显示了Aspose.Cells输出的HTML文件,显示了数据条、颜色刻度和图标集条件格式。正如您所见,它看起来和sample excel file一模一样。

todo:image_alt_text

示例代码

以下示例代码将示例excel文件转换为HTML,这只是一个普通的Excel to HTML conversion

// 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.");

相关文章