Import XML to Excel workbook with Node.js via C++

Import XML Map using Microsoft Excel

The following screenshot shows how to import XML Map using Microsoft Excel.

todo:image_alt_text

Import XML Map using Aspose.Cells for Node.js via C++

The following sample code shows how to make use of the Workbook.importXml(string, string, number, number). It generates the output excel file as shown in this screenshot.

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

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

// Create a workbook
const workbook = new AsposeCells.Workbook();

// Local XML file path
const XML = path.join(dataDir, "sampleXML.txt");

// Import your XML Map data starting from cell A1
workbook.importXml(XML, "Sheet1", 0, 0);

// Save workbook
workbook.save(path.join(dataDir, "output_out.xlsx"));

Advanced topics