Export Comments while Saving Excel file to HTML with Node.js via C++

Possible Usage Scenarios

When you save your Excel file to HTML, comments are not exported. However, Aspose.Cells for Node.js via C++ provides this feature using the HtmlSaveOptions.isExportComments property. If you set it to true, the HTML will also display the comments present in your Excel file.

Export Comments while Saving Excel file to HTML

The following sample code demonstrates the usage of the HtmlSaveOptions.isExportComments property. The screenshot shows the effect of the code on the HTML when it is set to true. Please download the sample Excel file and the generated HTML for reference.

todo:image_alt_text

Sample Code

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

// Load sample Excel file
const sourceDir = path.join(__dirname, "data");
const wb = new AsposeCells.Workbook(path.join(sourceDir, "sampleExportCommentsHTML.xlsx"));

// Export comments - set IsExportComments property to true
const opts = new AsposeCells.HtmlSaveOptions();
opts.setIsExportComments(true);

// Save the Excel file to HTML
const outputDir = path.join(__dirname, "output");
wb.save(path.join(outputDir, "outputExportCommentsHTML.html"), opts);