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

The following code imports xml data into worksheet ‘Sheet 1’ at Cell A1.

Workbook wb = new Workbook("Book1.xlsx");

wb.ImportXml("xml.xml", "Sheet1", 0, 0);

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