Importer XML dans un classeur Excel avec Node.js via C++

Importer une carte XML en utilisant Microsoft Excel

La capture d’écran suivante montre comment importer une carte XML en utilisant Microsoft Excel

todo:image_alt_text

Importer une carte XML en utilisant Aspose.Cells for Node.js via C++

Le code exemple suivant montre comment utiliser Workbook.importXml(string, string, number, number). Il génère le fichier Excel de sortie comme indiqué dans cette capture d’écran.

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"));

Sujets avancés