在使用Node.js通过C++将Excel转换为HTML时导出数据条、颜色刻度和图标集条件格式

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

下面的截图展示了具有 DataBar、ColorScale 和 IconSet 有条件格式的sample excel file。您可以从给定的链接下载sample excel file

todo:image_alt_text

下面的截图展示了 Aspose.Cells 输出的 HTML 文件,显示了 DataBar、ColorScale 和 IconSet 有条件格式。正如您所看到的,它看起来与sample excel file完全一样。

todo:image_alt_text

示例代码

以下示例代码将示例Excel文件转换为HTML,仅为普通Excel转HTML

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Specify the file path
const filePath = path.join(dataDir, "sample.xlsx");

// Load your sample excel file in a workbook object
const wb = new AsposeCells.Workbook(filePath);

// Save it in HTML format
wb.save(path.join(dataDir, "ConvertingToHTMLFiles_out.html"), AsposeCells.SaveFormat.Html);