XmlMaps Collection
Workbook
The XmlMaps collection is a collection of all of the XmlMap objects associated with a Spreadsheet component. An XmlMap object is an XML schema map that specifies how to map data from a data source to the Spreadsheet component.
Using the XmlMaps Collection
In the XmlMaps collection, individual XmlMap objects are indexed beginning with 1 for the first object, 2 for the second object, and so on. You return a XmlMap object from the XmlMaps collection using the Item property. The argument for the Item property is the index in the collection of the object you want to return or the map ID of the object. The map ID is the value of the ID attribute in the XML that represents the map. You can find this in the XML Spreadsheet file for the part or by examining the MapData property of the XmlMap object. You can create an XML Spreadsheet file by creating a data-bound spreadsheet in Microsoft Excel and then saving the workbook as an XML Spreadsheet. You can create a new XmlMap object by using the Add method of the XmlMaps collection.
The following example uses the XmlMaps property to return the XmlMaps collection object:
Dim objMaps
Dim objMap
Dim strMapInfo
Set objMaps = Spreadsheet1.ActiveWorkbook.XmlMaps
For Each objMap in objMaps
' Save the XML map information to a variable.
strMapInfo = objMap.MapData
' Work with the map information here.
Next