1043 Information from the Web
The fi rst four lines of the iqy fi le are mandatory; the third line is, of
course, the full URL of the Web document from which the query is
created. Note that the fourth line (mandatory, indicated with an arrow)
is blank. In our case the only other necessary line is the fi fth line—it
selects the 14th element on the Web page as the target of our import.
2
41.4.1 Running a Web Query
Web query fi les (having an iqy extension) can be run by Excel without
going through the full procedure illustrated in the fi rst part of this section.
When you open a Web query fi le in Excel, the query is run.
To illustrate, we change the ticker symbol ^DJI in the previous Web
query to GM, the symbol of General Motors. We save the resulting fi le
as gm.iqy; when we open this fi le in Excel, this is what happens:
Clicking on Open imports the data for GM:
2. This number is dependent on the structure of the Web page as recognized by the Web
query.