在 Excel 到 HTML 转换时导出 DataBar、ColorScale 和 IconSet 条件格式

在 Excel 到 HTML 转换时导出 DataBar、ColorScale 和 IconSet 条件格式

以下屏幕截图显示了示例 excel 文件使用 DataBar、ColorScale 和 IconSet 条件格式。您可以下载示例 excel 文件从给定的链接。

待办事项:图片_替代_文本

以下屏幕截图显示了 Aspose.Cells 输出 HTML 文件,其中显示了 DataBar、ColorScale 和 IconSet 条件格式。如您所见,它看起来与示例 excel 文件.

待办事项:图片_替代_文本

示例代码

下面的示例代码将示例 excel 文件转换为 HTML 这只是一个正常的Excel到HTML的转换.

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

相关文章