Importing Data from a Website
To import data from the web, you first need to identify the web address (URL) of the website with the data you want to import. Then you can use the import tools in Excel to import the data directly from the webpage into your worksheet.
Let’s say we want to import currency exchange rates from the web into our worksheet.
Below is how the data looks on the website after we’ve used the filters on the website to narrow down our search and display the data we want. We can now use this URL to import the data tables on the website.
https://www.xe.com/currencytables/?from=USD&date=2019-05-17
On the Data tab, in the Get & Transform Data group, click on the From Web button. Alternatively, on the Data tab, navigate to Get Data > From Other Sources > From Web .
Excel then opens the From Web dialog box with a URL field where you enter the address of the web page containing the data you want to import into Excel.
When you click OK , Excel will establish a connection to the website.
Note : If this is the first time you’ve connected to the website, Excel may display an Access Web-content dialog box with different connection options. Connect with the default which is Anonymous .
Once connected, Excel will display the Navigator screen, listing the data tables on the Selection pane on the left. When you click on a table in the Selection pane the data is displayed on the preview pane on the right.
To import more than one table of data from the web page, select the Select Multiple Items check box and then click the checkboxes against the table names you want to import.
Once you’ve selected the table(s) you want to import on the page, you have the following three import options:
After importing the data, you can manipulate and work with the data as you would with any other Excel table.
Refreshing Web Data
When working with tables imported from websites with live data, for example, financial websites like the Nasdaq or Dow Jones (while the markets are still open), you can refresh the data to reflect any changes in the data. When you import the data, Excel automatically stores information about the connection, so you just need one button click to refresh the data.
To refresh data imported from a website, on the Data tab, in the Queries & Connections group, click on the Refresh All button. This will automatically re-establish the connection and refresh the imported data with the latest data from the website.