Class XmlMap (Excel VBA)

The class XmlMap represents an XML map that has been added to a workbook.

The classes ListObject and XPath. give access to class XmlMap


Dim xmlmp as XmlMap
Set xmlmp = ActiveWorkbook.XmlMaps(Index:=1)

For Each

Here is an example of processing the XmlMap items in a collection.


Dim xmlmp As XmlMap
For Each xmlmp In ActiveWorkbook.XmlMaps
	
Next xmlmp

Methods

Delete - Removes the specified XML map from the workbook.

Export - Exports the contents of cells mapped to the specified XmlMap object to an XML data file.

ExportXml - Exports the contents of cells mapped to the specified XmlMap object to a String variable.

Import - Imports data from the specified XML data file into cells that have been mapped to the specified XmlMap object.

ImportXml - Imports XML data from a String variable into cells that have been mapped to the specified XmlMap object.

Properties

Name (Default member) - Returns or sets a String value that represents the friendly name used to uniquely identify a mapping in the workbook.

AdjustColumnWidth true if the column widths are automatically adjusted for the best fit each time that you refresh the specified XML map.

AppendOnImport true if you want to append new rows to XML lists that are bound to the specified schema map when you are importing new data or refreshing an existing connection.

DataBinding returns an XmlDataBinding object that represents the binding associated with the specified schema map.

IsExportable returns True if Microsoft Excel can use the XPath objects in the specified schema map to export XML data, and all XML lists mapped to the specified schema map can be exported.

PreserveColumnFilter returns or sets whether filtering is preserved when the specified XML map is refreshed.

PreserveNumberFormatting true if number formatting on cells mapped to the specified XML schema map are preserved when the schema map is refreshed. The default value is False.

RootElementName returns a String that represents the name of the root element for the specified XML schema map.

RootElementNamespace returns an XmlNamespace object that represents the root element for the specified XML schema map.

SaveDataSourceDefinition true if the data source definition of the specified XML schema map is saved with the workbook. The default value is True.

Schemas returns an XmlSchemas collection that represents the schemas that the specified XmlMap object contains.

ShowImportExportValidationErrors returns or sets whether to display a dialog box that details schema-validation errors when data is imported or exported through the specified XML schema map. The default value is False.

WorkbookConnection returns a new connection for the specified XMLMap object.

WorkbookConnection - A connection is a set of information needed to obtain data from an external data source other than a Microsoft Excel workbook.

XmlDataBinding - Represents the connection to the source data for an XmlMap object.

XmlNamespace - Represents a namespace that has been added to a workbook.

XmlSchemas - Represents the collection of XmlSchema objects contained by an XmlMap object.