Name

xmlmap.Import(Url, [Overwrite])

Synopsis

Imports data from a file into an XML map. Returns an xlXmlImportResult constant indicating whether the export was successful.

Argument

Settings

Url

The name of the file to import.

Overwrite

True replaces the data in the map with the data from the file. False appends the data from the file to the data already in the map. Default is False.

The following code imports the data from Numbers.xml and appends the data to the data already in the XML map:

Dim xmap As XmlMap, fname As String, res As XlXmlExportResult
Set xmap = ThisWorkbook.XmlMaps("Numbers_Map")
fname = ThisWorkbook.path & "\Numbers.xml"
res = xmap.Import(fname, True)

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.