Syntax

expression.ExportXml(Data)

expression A variable that represents a XmlMap object.

Parameters

Name Required/Optional Data Type Description
Data Required String The variable to export the data to.

Return Value

Remarks

XlXmlExportResult can be one of the following XlXmlExportResult constants.
xlXmlExportSuccess . Export successful. No errors to report.
xlXmlExportValidationFailed . The data being exported failed schema validation, but was exported anyway.

To export the contents of the mapped cells to an XML data file, use the method.

Example

The following example exports the contents of the cells mapped to the "Contacts" schema map to a variable named strContactData.

Visual Basic for Applications
Sub ExportToString() Dim strContactData As String ActiveWorkbook.XmlMaps("Contacts").ExportXml Data:=strContactData End Sub
export Export the contents of cells mapped to an XML Map to a String variable export xml exportxml exportxml method

See also: