Microsoft Office Tutorials and References
In Depth Information
You could create a list based on that set of column labels using this procedure (which you
would add to a code module):
Sub CreateListObject()
ActiveSheet.ListObjects.Add(xlSrcRange, Range(“$A$1:$K$1”), , xlYes)<;$RD>
.Name = “Suppliers1"
End Sub
Lists are a terrific addition to your battery of Excel tools, but they’re even more powerful
when you combine them with XML data. The next section of this chapter introduces the
basics of the Extensible Markup Language and how Excel uses it to facilitate data handling.
Creating XML Schemas
At the heart of XML-based data interchange is the schema , which is a document that defines
the structure of a set of XML files. You can create a custom schema in an XML editor, write
the XML code yourself in a simple text editor such as Notepad, or you can have Excel do it
for you when you save a workbook as an XML document. The following listing, which was
created using Notepad, shows the schema used in the examples throughout this chapter:
<?xml version="1.0” encoding="utf-8” ?>
<schema xmlns="">
<element name="Root">
<element name="Supplier” maxOccurs="unbounded">
<element name="SupplierID” type="positiveInteger"/>
<element name="CompanyName” type="string"/>
<element name="ContactName” type="string"/>
<element name="ContactTitle” type="string"/>
<element name="MailingAddress">
<element name="Address” type="string"/>
<element name="City” type="string"/>
<element name="Region” type="string"/>
<element name="PostalCode” type="string"/>
<element name="Country” type="string"/>
<element name="Phone” type="string"/>
<element name="Fax” type="string"/>
Search JabSto ::

Custom Search