New parts in [Content_Types].xml (other parts omitted for clarity)
New parts are listed for the query table, table, and connections that we know from the
previous chapter are associated with a workbook containing imported data. The contents of
the \xl\connections.xml file in Figure 3-28 should look very familiar to you by now.
CHAPTER 3 n USING XML IN EXCEL 2007 126
Figure 3-28. Connections.xml contents
It??™s the same connect string we used in the code we generated and that Excel generated
for us with the Macro Recorder. The id attribute tells us this is connection 1 (in this case, the
only connection in the file). The sourceFile attribute tells us where the data came from.
The last two attributes of the connection node refer to the ADO Command object and the
CommandType.
The xl\queryTables\queryTable1.xml file displayed in Figure 3-29 shows the relationship
between the connection and the query table object. The queryTable node has a connectionId
attribute of 1, referring to the OLE DB connection we just looked at. Then there are some formatting
attributes, followed by a list of field names with queryTableField IDs and
tableColumnIds linking the query table to an Excel table (or range).
Figure 3-29. queryTable1.xml contents
We find that there??™s a new folder in our structure called tables. In this folder is a file
named Table1.xml (shown in Figure 3-30). Table1.xml looks very similar to queryTables1.xml.
It has the same field mapping information, but also contains information about the range
name (Table_Northwind_2007.
Pages:
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150