How to extract data from website to Excel automatically?

Extracting data (data collection and update) automatically from a web page to your Excel worksheet might be important for some jobs. Excel gives you the opportunity to collect data from a web page.

Yes, Excel is awesome like that!!

Let’s dive into the process of helping you out.

But first, a word of caution: the web page must have data in collectible formats like Table or Pre-data format. Otherwise, it would be another battle to convert it to readable or excel-able format. You see text to columns feature isn’t always your best friend.

So, we shall assume your life is easy like that and you have a website which has data in a compatible excel-able format.

Read More: How to Import Data from a Website to Excel?

Extract Data from Google Finance Page to Excel Automatically

We will be using the Excel’s From Web Command in the Data ribbon to collect data from the web. Say, I want to collect data from this page.

Google Finance Page

It is Google’s finance related web page.

In the Excel worksheet, open the Data ribbon and click on the From Web command.

Extract data, Website, Excel

New Web Query dialog box appears.

In the address bar, I paste the address of Google’s finance web page: Then I click on the Go button, placed right after the address bar.

Extract Data, Website, Excel

The same web page comes in the query dialog box. Now spot the yellow arrows near the query box.

Extract Data, Website, Excel

Move your mouse pointer over the yellow arrows. You see a zone is highlighted with blue border and the yellow arrow becomes green.

Extract Data, Website, Excel

[click on the image to get a full view]

Extract Data, Website, Excel

[Click on the image to get a full view]

I have chosen World Markets data, Currency Data, and Sector Summary.

Now I click on the Import button. Import Data dialog box appears. It asks me the location. Currently, I am planning to save it in cell A1, you can save it anywhere and everywhere.

You might see a cryptic message or two when you hit OK. Relax those aren’t aliens trying to contact you, just your worksheet is populating data.

Extract Data, Website, Excel

You see the data is inserted into the worksheet.

Now let me show you where Excel did flip. I scroll down and find this column blank.

Extract Data, Website, Excel

When I checked the website I found that there was a chart there which Excel was not able to pull. So, you have to be careful about what you are taking from a web page.

Now, you have got the data and can begin working and manipulating it.

Most important/interesting thing to note here is: you don’t have to pull the updated data time to time.

Read More: Creating a Pivot Table Automatically

How to Refresh Excel Data for Any Update

You can manually or automatically refresh the data. How? Say Abracadabra! No, am just kidding. (But it’s almost like magic).

Click on the drop down part of the Refresh All command.

Extract Data, Website, Excel

You can click on Refresh if you think you have only one data and you can click on Refresh All if you think you have more than one data to be refreshed.

Extract Data, Website, Excel

You can even set a time period for refreshing data automatically. Click on this Connection Properties option from the list.

Extract Data, Website, Excel

Connection Properties dialog box appears.

Extract Data, Website, Excel

You can name the connection. Add a description to it.

Under Refresh Control, you get a command Refresh Every (by default 60 minutes), you can change it.

Or you can choose the option Refresh Data when opening the file. I click OK. So, the data of this worksheet will be updated when I will open the worksheet.

Read More: Importing Data in Excel

So, this is how you can pull data from a web page, manipulate the data in your own way and then you can set when the data will be updated automatically.

Cool, right? Now time for coffee!!

Kawser on EmailKawser on FacebookKawser on LinkedinKawser on TwitterKawser on Youtube

Welcome to my Excel blog! I am conducting deep dives into the world of Excel. Please join with me and explore Excel deeply.

Keep in mind this African proverb:

"If you want to go fast, go alone,
If you want to go far, go together."

Let's together explore Excel deeply!

  1. Reply'
    Anand March 4, 2017 at 6:12 AM

    Very Good!

  2. Reply'
    MAB August 6, 2017 at 6:10 AM

    is the data in the web page is not highlighted with the yellow arrow, how do I download the data??

    Leave a reply

    Solve the Math * Time limit is exhausted. Please reload CAPTCHA.