Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells allows you to import the XML map inside the workbook using the Workbook.importXml(string, string, number, number) method. You can import XML Map using Microsoft Excel with the following steps:
You will need to provide your XML data to complete the import. Here is a sample XML data that you can use for testing.
The following screenshot shows how to import XML Map using Microsoft Excel.
![]() |
|---|
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.
![]() |
|---|
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"));
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.