Workbook.ImportXml

ImportXml(string, string, int, int)

Imports/Updates an XML data file into the workbook.

public void ImportXml(string url, string sheetName, int row, int col)
ParameterTypeDescription
urlStringthe url/path of the xml file.
sheetNameStringthe destination sheet name.
rowInt32the destination row
colInt32the destination column

Examples

using System;
using Aspose.Cells;

namespace AsposeCellsExamples
{
    public class WorkbookMethodImportXmlWithStringStringInt32Int32Demo
    {
        public static void Run()
        {
            // Create a workbook object
            Workbook wb = new Workbook();
            
            // Import XML data into the first worksheet starting at cell A1
            wb.ImportXml("data.xml", "Sheet1", 0, 0);
            
            // Save the workbook
            wb.Save("output.xlsx");
        }
    }
}

See Also


ImportXml(Stream, string, int, int)

Imports/Updates an XML data file into the workbook.

public void ImportXml(Stream stream, string sheetName, int row, int col)
ParameterTypeDescription
streamStreamthe xml file stream.
sheetNameStringthe destination sheet name.
rowInt32the destination row.
colInt32the destination column.

See Also