Computer >> Computer tutorials >  >> Software >> Office

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. This is one of the most used Excel features for those who use Excel for their data analysis job. If you are working for a financial analyst company, you might need to get or import daily stock prices from a website to your Excel workbook for analysis. In this article, I will show you how to extract data from a website to excel automatically in easy steps.

Step by Step Procedures to Extract Data from Website to Excel Automatically

We will be using Excel’s From Web command in the Data ribbon to collect data from the web. For example, I want to collect data from this page. It is the webpage of the U.S Energy Information Administration showing the information on Petroleum prices.

How to Extract Data from Website to Excel Automatically

Now, let us follow the steps below to extract this data into excel.

Step 1: Insert Web Address to Excel

In the beginning, we will provide the website information in excel.

  • First, go to the Data tab and select From Web in the Get & Transform Data group.

How to Extract Data from Website to Excel Automatically

  • Then, insert the web URL in the From Web dialogue box.

How to Extract Data from Website to Excel Automatically

  • After that, press OK.

Step 2: Extract Data Table from Navigator Window

At this stage, we will proceed to the main part of extracting data. Let’s see how it works.

  • First, you will see the Navigator window.
  • Here, select the table from the Display Options.
  • Along with it, you will see the preview in the Table View tab.

How to Extract Data from Website to Excel Automatically

  • Lastly, press on Load.
  • That’s it, you have successfully extracted data from the website automatically.

How to Extract Data from Website to Excel Automatically

Read More: How to Extract Data From Table Based on Multiple Criteria in Excel

Step 3: Apply Refresh All Command for Data Update

So now, as we have our data, we will need confirmation that it is linked to the website. Because we want regular updates in our excel file whenever there is an update on the website. So here is the solution.

  • Simply go to the Data tab.
  • Then click on Refresh All every time you want an update.

How to Extract Data from Website to Excel Automatically

Step 4: Refresh Data Within Fixed Time Limit

Data update is more flexible with the Connection Properties tool. Follow the process below:

  • First, go to the Data tab and select Refresh All.
  • Here, choose Connection Properties from the drop-down menu.

How to Extract Data from Website to Excel Automatically

  • Following, you will see the Query Properties dialogue box.
  • Here, you can adjust the time to decide when you want an update from the website in the Refresh Control section.
  • After that, click on OK.

How to Extract Data from Website to Excel Automatically

Read More: Excel VBA: Pull Data Automatically from a Website (2 Methods)

Similar Readings

  • How to Extract Data from Excel to Word (4 Ways)
  • Transfer Data from One Excel Worksheet to Another Automatically
  • How to Pull Values From Another Worksheet in Excel
  • Importing Data into Excel (3 Suitable Ways)
  • How to Extract Data from Excel Based on Criteria (5 Ways)

How to Edit Extracted Data Table in Excel

So now, as we have our final extracted data, you can see that there are some blank cells that confuse the readers. Here is a quick editing solution for this extracted data table.

  • In the beginning, double-click on the table showing in the Queries & Connections panel.

How to Extract Data from Website to Excel Automatically

  • Then, in the new window, select Down from the Transform tab.

How to Extract Data from Website to Excel Automatically

  • As a result, it will create an option in the Applied Steps.
  • Here, select the Changed Type step.

How to Extract Data from Website to Excel Automatically

  • Then, select Replace Values in the Transform group from the Home tab.

How to Extract Data from Website to Excel Automatically

  • After this, agree to Insert in the Insert Step dialogue box.

How to Extract Data from Website to Excel Automatically

  • Next, insert the Replace With value as null and keep the Value To Find box blank.

How to Extract Data from Website to Excel Automatically

  • Afterward, press OK.
  • Now, select Filled Down as the Applied Steps.

How to Extract Data from Website to Excel Automatically

  • Finally, you will see the whole table without any blank cells.

How to Extract Data from Website to Excel Automatically

  • Lastly, change the table name from the Query Settings.

How to Extract Data from Website to Excel Automatically

  • Then, press Close & Load.

How to Extract Data from Website to Excel Automatically

  • That’s it, here is the final output.

How to Extract Data from Website to Excel Automatically

Read More: How to Extract Data from Excel Sheet (6 Effective Methods)

Things to Remember

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 a readable or excel-table format. You see, the Text to columns feature isn’t always your best friend.

Conclusion

So, this was a complete guideline for you on how to extract data from a website to excel automatically with easy steps. Let us know your insightful suggestions in the comment box. Follow ExcelDemy for more articles.

Related Articles

  • How to Convert Text File to Excel Automatically (3 Suitable Ways)
  • Extract Filtered Data in Excel to Another Sheet (4 Methods)
  • How to Import Data from Secure Website to Excel (With Quick Steps)
  • Import Data from Excel into Word Automatically Using VBA (2 Ways)
  • How to Extract Data from a List Using Excel Formula (5 Methods)
  • Excel Macro: Extract Data from Multiple Excel Files (4 Methods)
  • How to Extract Data from Cell in Excel (5 Methods)