- Do one of the following:
-
On the Data menu, point to Import External Data, and then click New Web Query.
-
In the New Web Query dialog box enter the URL for the Web page from which you want to get data. You can type the URL, paste it from a copied address, or click the arrow next to the Address list and select a recently used address.
-
Click Go.
-
In your browser, browse to the Web page from which you want to query data.
-
Click the arrow next to the Edit with... button (which may appear as one of several application icons, depending on how the page was created) and click Edit with Microsoft Excel.
-
- Click next to the tables you want to import or click in the upper left corner of the page to import the entire page.
If there are no next to tables on the page, click Show Icons at the top of the dialog box to display them.
- Web queries are automatically saved with your workbook. If you want to save the query so that it can be run in other workbooks, click Save Query . The query is saved in a text file with an .iqy extension.
- To set formatting and import options for how data is returned, click Options and select the options you want in the Web Query Options dialog box.
- Click Import.
In the Import Data dialog box, do one of the following:
- To return the data from the Web page to the selected worksheet, click Existing worksheet. On your worksheet, click the cell where you want to place the upper-left corner of the external data range, and then click OK.
- To return the data to a new worksheet, click New worksheet, and then click OK. Excel adds a new worksheet to your workbook and automatically starts the external data range in the upper-left corner of the new worksheet.
After you click OK, a spinning refresh icon appears in the status bar to indicate that the query is running. To check the status of the query, double-click the refresh icon.
- On the Data menu, point to Import External Data, and then click Import Data.
- Locate the folder where your query file is stored in the Look in box.
- Select the Web query you want to run.
- Click Open.
In the Import Data dialog box, do one of the following:
To return the data from the Web page to the selected worksheet, click Existing worksheet. On your worksheet, click the cell where you want to place the upper-left corner of the external data range, and then click OK.
To return the data to a new worksheet, click New worksheet, and then click OK. Excel adds a new worksheet to your workbook and automatically starts the external data range in the upper-left corner of the new worksheet.
- If prompted, enter parameters for the query. If you don't know what the valid parameters are, ask the person who created the query.
Excel runs the query. A spinning refresh icon appears in the status bar to indicate that the query is running. To check the status of the query, double-click the refresh icon.