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

Possible Usage Scenarios

When you save your Excel file to HTML, for the scenario that there are multiple occurrences for one base64 image, with custom property the image data only needs to be saved once so the performance of the resultant HTML can be improved. 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 EnableCssCustomProperties
opts.setEnableCssCustomProperties(true);

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