Share via


ExportXml Method [Excel 2003 VBA Language Reference]

Note  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.

XlXmlExportResult

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.

expression.ExportXml(Data)

expression Required. An expression that returns one of the objects in the Applies To list.

Data   Required String. The variable to export the data to.

Remarks

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

Example

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

Sub ExportToString()
    Dim strContactData As String

    ActiveWorkbook.XmlMaps("Contacts").ExportXml Data:=strContactData
End Sub

Applies to | XmlMap Object