Workbook.SaveAsXMLData (Excel)

Exports the data that has been mapped to the specified XML schema map to an XML data file.

This method results in a run-time error if Excel cannot export data with the specified schema map. To check whether Excel can use the specified schema map to export data, use the IsExportable property.

SaveAsXMLData (Filename, Map)

Dim strFilename As String: strFilename = 
ActiveWorkbook.SaveAsXMLData Filename:=strFilename, Map:=

Arguments

The following arguments are required:

Filename (String) - A string that indicates the name of the file to be saved. You can include a full path; if you don't, Microsoft Excel saves the file in the current folder.

Map (XmlMap) - The schema map to apply to the data.