The preceding sections explained how to use the new XML features found in Excel and provided code for saving, transforming, importing, and exporting XML with Excel. Those sections provide a context for Excel’s XML features and explain programming tasks that surround those features. The rest of this chapter deals exclusively with the XML objects Excel provides and offers specific examples of programming tasks you can perform with those object, properties, and methods.
Excel’s XML object model deals exclusively with XML maps. Opening and saving XML spreadsheets is done through the
Save methods. Figure 15-18 illustrates the Excel XML objects hierarchically.
Figure 15-18. The XML object hierarchy
XmlMap object allows you to perform the following tasks in code:
Add XML maps to a workbook
Delete XML maps from a workbook
Export XML data through an XML map
Import XML data through an XML map
Bind an XML map to an XML data source
Refresh mapped lists and ranges from an XML data source
View the XML schema used by an XML map
The following sections explain these tasks in greater detail.