XmlMap.ImportXml Method
Imports XML data from a String variable into cells that have been mapped to the specified XmlMap object. Returns an XlXmlImportResult constant.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function ImportXml ( _
XmlData As String, _
Overwrite As Object _
) As XlXmlImportResult
'Usage
Dim instance As XmlMap
Dim XmlData As String
Dim Overwrite As Object
Dim returnValue As XlXmlImportResult
returnValue = instance.ImportXml(XmlData, _
Overwrite)
XlXmlImportResult ImportXml(
string XmlData,
Object Overwrite
)
Parameters
XmlData
Type: System.StringRequired String. The string that contains the XML data to import.
Overwrite
Type: System.ObjectOptional Boolean value. Specifies whether to overwrite the contents of cells that are currently mapped to the specified XML map. Set to True to overwrite the cells; set to False to append the data to the existing range. If this parameter is not specified, the current value of the AppendOnImport property of the XML map determines whether the contents of cells are overwritten or not.
Return Value
Type: Microsoft.Office.Interop.Excel.XlXmlImportResult
Remarks
XML features, except for saving files in the XML Spreadsheet format, are available only in Microsoft Office Professional Edition 2003 and Microsoft Office Excel 2003.
To import the contents of an XML data file into cells mapped to a specific schema map, use the Import method of the XmlMap object.