Name
xmlmap.Export(Url, [Overwrite])
Synopsis
Exports mapped data in an XML map to an XML file. Returns an xlXmlExportResult constant indicating whether the export was successful.
|
Argument |
Settings |
|---|---|
|
|
The name of the file to create. |
|
|
True overwrites the file if |
Use the IsExportable property to determine if the data can be exported before using the Export method. Excel exports only nodes that have been mapped to a list or range. Unmapped nodes are not exported, although the file still conforms to the XML map’s schema.
The following code exports mapped nodes in the XML map named Numbers_Map to create the file Numbers.xml:
Set xmap = ThisWorkbook.XmlMaps("Numbers_Map")
If xmap.IsExportable Then
fname = ThisWorkbook.path & "\Numbers.xml"
res = xmap.Export(fname, True)
End IfBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access