Page 644 - Excel 2013 All-in-One For Dummies
P. 644
626 External Data Query
Figure 2-10 shows same new workbook, this time with the Products work- sheet selected and the Manage Relationships dialog box open (by clicking the Relationships button on the Data tab). When Excel imported these two data tables, it automatically picked up on and retained the original relation- ship between them in the Northwind database, where the CustomerID field is the primary key field in the Customers data table and a foreign key field in the Orders data table.
Figure 2-10:
Orders worksheet with the data imported from the Orders data table in the Northwind database showing the relationship with the Customers table.
After importing the data, you can then use the Filter buttons attached to the various fields to sort the data (as described in Book VI, Chapter 1) and filter the data (as described earlier in this chapter).
Excel keeps a list of all the external data queries you make so that you can reuse them to import updated data from another database or web page.
To reuse a query, click the Connections button on the Data tab (Alt+AO) to open the Workbook Connections dialog box to access this list and then click the name of the query to repeat.
Retrieving data from the web
To make a web page query, you click the From Web command button on the Get External Data button’s drop-down menu on the Ribbon’s Data tab or press Alt+AZXFW. Excel then opens the New Web Query dialog box containing the