Microsoft Office Tutorials and References
In Depth Information
Figure 25-5. The New Web Query dialog box shows the table of exchange rates
ready to be imported into the Excel spreadsheet.
That Was Table Number 2?
There are times when you view a Web page that contains many tables. Web sites that con
tain many tables can make it difficult to determine the number of the WebTables property.
It might be difficult to determine the table number, but there are ways to verify the number.
A quick way to verify the number of a table within the Web site is to record a macro and set
up a Web Query. The Web Query should import the table you need to work with in a new
sheet to avoid complications. After the Web Query has been created, stop recording the
Review the recorded macro code until you find the WebTables property. The value assigned
to the WebTables property will be the table number you were searching for.
There are times when recording macros can assist in finding values and properties that are
otherwise tedious to locate. Sometimes when working through new properties and new
object models, recording simple macros and reviewing their code will show you properties
and methods you didn’t know existed. Keep in mind that any recorded macros should be
cleaned up, however. There are always additional lines of code that are unnecessary.