Excel makes it easy to extract table data from a Web page — but to be of use in a worksheet, you will need to convert the text tables into columns. For example, say you need to chart U.S. GDP data from 2002 through 2006. First, you would use a Web query to import the data from the Web. Then, you'd extract the data into two separate columns. Follow these steps:
- Open a blank worksheet.
- Go to Data | Import External Data and then click New Web Query. In Excel 2007, click the Data tab, click Get External Data, and then click From Web.
- Enter the Web page URL http://forecasts.org/data/index.htm (Figure A).
- Scroll to Gross Domestic Product.
- Click the arrow next to the Gross National Product Table. (If there are no arrows next to tables on the page, click Show Icons twice at the top of the dialog box to display them.)
- Click the Import button (Figure B).
- Click Existing Worksheet, if necessary.
- Click the cell on the worksheet where you want the upper-left corner of the Web data to appear and click OK.
- Select the data cells containing the text you want to convert.
- Go to Data | Text To Columns. (In Excel 2007, click Text To Column in the Data Tools Group on the Data tab.)
- Select Delimited (Figure C).
- Click Next.
- Click to select the Space check box under Delimiters (Figure D).
- Click Next.
- Click Finish.
Miss an Excel tip?
Check out the Microsoft Excel archive and catch up on other Excel tips.
Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.