Page 36 - Microsoft Office Excel 2003 Programming Inside Out
P. 36
Part 1: Preliminaries
Microsoft Office Excel 2003 Programming Inside Out
when you add data to a list). If you are working on a network equipped with SharePoint
Services, you can publish the list to the server, update the list’s data using the copy of the list
on the SharePoint site, or edit a copy of the list on a computer away from the network and
integrate your changes when you return. You can also use the more advanced data validation
tools available through SharePoint to limit the types of data you and your colleagues can enter
Chapter 1
into the lists. In Excel, you can require users to enter numerical values, but on a SharePoint
server you can be more specific as to data type, such as by requiring users to enter integer values.
Figure 1-2. Data lists enhance your ability to create and display data collections in
Excel 2003.
Mapping Excel Data to XML Schemas
XML data structures are defined in a schema, which in Excel is stored in a .xsd file. The fol
lowing XML code listing shows how you might construct part of a schema to store data about
a product.
This XML code isn’t a macro you can run using the Microsoft Visual Basic Editor. Instead, the code
describes a product with three attributes.
<xs:complexType name="productType">
<xs:sequence>
<xs:element name="productId” type="xs:string” />
<xs:element name="productName” type="xs:string” />
<xs:element name="priceEach” type="xs:decimal” />
</xs:sequence>
</xs:complexType>
10