Get External Data
We often must look up statistics. We can use Excel's Web Query feature to execute a Web lookup and to automatically update the data from the Internet each time you open the file.
We will create a Web query to look up team statistics.
- Open a blank worksheet and click in A1.
- Click Data/Import External Data/New Web Query.
- In the Address box, enter the address of the Web page that contains the team statistics
- For example, http://msn.foxsports.com/mlb/standings.
- Click Go.
- Click the yellow boxes with arrows next to the blocks of text you want to import. The yellow boxes will turn green.
- Click the Import button.
To set the Web query to run every time the file is opened:
- Right-click a blank area of the toolbar and select External Data.
- Click the Data Range Properties button.
- In the Refresh Control section, select Refresh Data On File Open.
- Click OK.
Now the spreadsheet will automatically update the data from the Internet each time the file is opened.
Sometimes you may wish to take a snapshot of the data at a given time, but copying and pasting the data to another worksheet will only create another Web
query that will update the next time the file is opened.
To create a copy of the data that will not change automatically, follow these steps:
- Select the data you want to copy. Click Edit/Copy.
- Click on the cell where you want the snapshot of the data to appear.
- Click Edit/Paste Special.
- Click Values And Number Formats checkbox and then click OK.