Enable CSS Custom Properties while saving to HTML with Node.js via C++

Possible Usage Scenarios

When you save your Excel file to HTML, in scenarios where there are multiple occurrences of the same base64 image, this custom property ensures that the image data needs to be saved only once, improving the performance of the resulting HTML. Please use HtmlSaveOptions.getEnableCssCustomProperties() property and set it true while saving to HTML. todo:image_alt_text

Enable CSS Custom Properties while saving to HTML

The following sample code shows the usage of HtmlSaveOptions.getEnableCssCustomProperties() property. The screenshot shows the effect of this property when it is not set to true. Please download the sample Excel file used in this code and the output HTML generated by it for reference.

Sample Code

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

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Load sample workbook
const workbook = new AsposeCells.Workbook(path.join(dataDir, "sampleEnableCssCustomProperties.xlsx"));

const opts = new AsposeCells.HtmlSaveOptions();
opts.setExportImagesAsBase64(true);

// Enable CssCustomProperties
opts.setEnableCssCustomProperties(true);

// Save the workbook in HTML
workbook.save(path.join(dataDir, "outputEnableCssCustomProperties.html"), opts);