Disable Downlevel Revealed Comments while saving to HTML with Node.js via C++

Possible Usage Scenarios

When you save your Excel file to HTML, Aspose.Cells reveals Downlevel Conditional Comments. These conditional comments are mostly relevant to older versions of Internet Explorer and are irrelevant to modern web browsers. You can read about them in detail at the following link.

Aspose.Cells for Node.js via C++ allows you to eliminate these Downlevel Revealed Comments by setting the HtmlSaveOptions.getDisableDownlevelRevealedComments() property to true.

Disable Downlevel Revealed Comments while saving to HTML

The following sample code shows the usage of HtmlSaveOptions.getDisableDownlevelRevealedComments() 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.

todo:image_alt_text

Sample Code

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

// The path to the documents directory.
const sourceDir = path.join(__dirname, "data");
const outputDir = path.join(__dirname, "output");

// Load sample workbook
const workbook = new AsposeCells.Workbook(path.join(sourceDir, "sampleDisableDownlevelRevealedComments.xlsx"));

// Disable DisableDownlevelRevealedComments
const opts = new AsposeCells.HtmlSaveOptions();
opts.setDisableDownlevelRevealedComments(true);

// Save the workbook in html
workbook.save(path.join(outputDir, "outputDisableDownlevelRevealedComments_true.html"), opts);