Microsoft Office Tutorials and References
In Depth Information
strXPath = “/Root/Supplier/MailingAddress/Region"
Range(“H2”).XPath.SetValue myMap, strXPath
strXPath = “/Root/Supplier/MailingAddress/PostalCode"
Range(“I2”).XPath.SetValue myMap, strXPath
strXPath = “/Root/Supplier/MailingAddress/Country"
Range(“J2”).XPath.SetValue myMap, strXPath
strXPath = “/Root/Supplier/Phone"
Range(“K2”).XPath.SetValue myMap, strXPath
strXPath = “/Root/Supplier/Fax"
Range(“L2”).XPath.SetValue myMap, strXPath
ActiveWorkbook.XmlMaps(“Root_Map”).Import URL:="C:\MySuppliers.xml"
End Sub
Figure 26-8. Assigning schema elements to column headers in an existing data list gives
you full list functionality and a data map.
In this chapter, you’ve learned how to use the new XML capabilities in Excel 2003. Although
the ability to save files as XML workbooks has been around since Excel Version 2002, you
now have greater access to the XML object model and can import, export, and manipulate
data within your workbooks programmatically. The tools at your disposal make it possible to
transport data across a wide variety of platforms, making it easier for you to work with cus­
tomers, suppliers, and colleagues regardless of the spreadsheet application they use.
Search JabSto ::




Custom Search