Export Document Workbook and Worksheet Properties in Excel to HTML conversion with Node.js via C++

Possible Usage Scenarios

When a Microsoft Excel file is exported to HTML using Microsoft Excel or Aspose.Cells for Node.js via C++, it also exports various types of Document, Workbook, and Worksheet properties as shown in the following screenshot. You can avoid exporting these properties by setting the HtmlSaveOptions.getExportDocumentProperties()HtmlSaveOptions.getExportWorkbookProperties() and HtmlSaveOptions.getExportWorksheetProperties() as false. The default value of these properties is true. The following screenshot shows how these properties look like in exported HTML.

todo:image_alt_text

Export Document, Workbook and Worksheet Properties in Excel to HTML conversion

The following sample code loads the sample Excel file and converts it to HTML without exporting the Document, Workbook, and Worksheet properties in the output HTML.

Sample Code

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

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

// Load the sample Excel file
const workbook = new AsposeCells.Workbook(filePath);

// Specify Html Save Options
const options = new AsposeCells.HtmlSaveOptions();

// We do not want to export document, workbook and worksheet properties
options.setExportDocumentProperties(false);
options.setExportWorkbookProperties(false);
options.setExportWorksheetProperties(false);

// Export the Excel file to Html with Html Save Options
workbook.save("outputExportDocumentWorkbookAndWorksheetPropertiesInHTML.html", options);