Discussion Locked

How to get data from webpage into Excel?

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I tried to use web queries in Excel today but it didnt work. I tried to get the tables on: http://www.spglobal.com/indexmain500_data.html but it doesn't work. The examples at microsoft don't help me either. Can anyone here help me with this? Could be pretty simple, but...

5 replies

by dklippert

Go to Data>Get External Data>New Web Query.
Paste or type the URL in the first box. Choose only the tables for the second option. Choose no formatting for the third option.Save the query if you want to be able to quickly run the query in the future.
When you click OK you'll be asked for a cell to start importing the data. You'll see some text appear in that cell. Wait a fwe minutes (Depending on the speed of your connection) and there's your data.

by steved

Here are the steps I used, and it worked fine.

1) Create new Excel worksheet.

2) From the Data menu, select Get External Data, then New Web Query.

3) In the Web Query dialog box that comes up, put the URL in the input field under number 1. Under number two, select "One or more specific tables on the page" and enter the number 3 in the input field. (I found by trial and error that this setting will retrieve the core data in the middle of the web page. If you want the whole page, leave the default setting under number 2.)

4) Click OK.

5) When a new dialog box comes up asking where on the worksheet you want to place the data, input a cell (or leave the default) and click OK.

After a few seconds, the data should appear on your worksheet. For accurate representation, you may have to change the formatting of some of the cells. For example, there's a column that starts out as percentages and then has some dollar amounts. Excel treats the dollar amounts as percentages unlessyou format those cells as Currency.

If it doesn't behave the same way for you, please respond by saying what exactly it does do at each stage that's different from what I described here.

I hope this helps.

Steve Diamond

This discussion is closed to new replies.