Get Live Data from Web Page into Excel (2024)

Data Acquisition » Excel » Web Page Data into Excel

How to feed live data from a web page into Excel

There are two ways you can feed live data from a web page into Excel. The easiest just entails making menu and dialogue box selections in Excel. However, you can perform more sophisticated operations using a web query file.

You can capture data which is held in a table or as preformatted text (inside the HTML <table> or <pre> tags).

Quick Importing of Live Data

You can easily import a table of data from a web page into Excel, and regularly update the table with live data.

  1. Open a worksheet in Excel.
  2. From the Data menu depending on version of Excel select Get & Transform Data > From Web (eg in Excel 2016) or Get External Data (eg in 2000) or Import External Data (eg in XP).
  3. In Excel 2016:
    • Fill in the URL of the web page with your desired data table. Excel will connect.
    • Choose a table and select Load.
      Get Live Data from Web Page into Excel (1)
  4. In Excel 2000:
    • Select New Web Query.
    • Fill in this dialogue with the URL of the web page, the table of data you want and the formatting you want to keep.
      Get Live Data from Web Page into Excel (2)
  5. In Excel XP:
    • Select New Web Query.
    • Enter the URL of the web page from which you want to import the data and click Go.
    • Choose the table of data you wish to import, then click the Import button.
  6. Choose how often you want to refresh the data. In Excel 2016, From the Data menu select Queries & Connections. Right-click your table and select Properties then choose how often to refresh. In Excel 2000, from the Data menu select Import External Data again, then choose Data Range Properties.

This method is also useful for capturing static data from a web site. The data will be reliably imported into correct columns and rows in Excel. If you merely copy and paste data from a web page to Excel, you sometimes find the entire row of data is in one cell. (Using the Paste Special command will often also achieve this, but not always.)

Creating a Web Query File

For more flexibility in importing data use a web query file. This is a text file with the extension .iqy. Its contents looks like this:

 http://weather.msn.com/local.aspx?wealocations=wc:UKXX0092 Selection=2 Formatting=None
  • The first line is the URL of the page holding the data. In our example current weather conditions in Manchester, from the msn.com site.
  • The second line is blank.
  • The third line sets which table of data to import, in this case the second table on the page. It takes the form selection=. See below for more details.
  • The fourth line specifies that any formatting on the web page should be ignored.
  • Right-click here to download an example .iqy file

To use this text file,

  1. In Excel 97 and XP, from the Data menu select Import External Data.
    • Select Import Data and choose your .iqy file.
    • Choose where to put the data and click OK. The live data appears in your spreadsheet.
  2. In Excel 2000, from the Data menu select Get External Data
    • Click Run Saved Query
    • Select the .iqy file you have created and choose where to put the data.

Other selection options are available: Selection=AllTables, Selection=EntirePage and Selection="name of table". To find the name of a table you will have to look at the source code of the page. For more than one table, separate the table names or numbers with commas.

Other formatting options are available: Formatting=None returns plain text without any formatting. You could also use formatting=All, to copy all the fonts and hyperlinks in the web page to the Excel sheet. Finally you could use Formatting=RTF, to keep most of the formatting put not the hyperlinks.

Using a query file gives you great flexibility. For instance, you can code the file so Excel will ask you which data items you want.

Requesting Different Items of Data

Excel calls this using dynamic parameters. As an example I'll use a Google search for "Windmill Software".

If you searched on Google for "Windmill Software", the URL of the search results might look like this
http://www.google.co.uk/search?q=windmill+software
If you used this as your Web Query URL, the search results for "Windmill Software" would be placed in your spreadsheet.

However, if you use a line like this as your Web Query
http://www.google.com/search?q=["q","Enter the Search Term:"]
you will be asked for the search term Google is to use.

Of course, you won't often need to display search results in your spreadsheet, but it illustrates the method. You can do this for any web site handling data in this way. That is, any website returning data with a ? in the URL followed by a name=value pair.

In Excel XP, you can also nominate a cell in the spreadsheet to hold the query term. Whenever the contents of this cell change, the data will be updated in Excel.

To do this:

  1. In Excel, from the Data menu select Import External Data.
  2. Choose an .iqy file then click the Parameters button.
  3. Choose to "Get the value from the following cell" and select the cell.

Using a query file in this way provides an easy and quick way to get live data from the web into your spreadsheets. You can choose how often to refresh the data, or simply to keep it as it is.

More Excel Tips and Tricks

  • Our free Monitor newsletter (ISSN 1472-0221) features a series of Excel Corners, giving hints and tips on using Excel. To subscribe to Monitor fill in your e-mail below.
  • For information on charting with Excel, see our Excel Charting Tips
  • For more tips on using Excel, see our Excel Tips and Tricks page.

Comments

Get Live Data from Web Page into Excel (2024)
Top Articles
How to Fix a 401 Unauthorized Error? What it is and how to Fix it
What is an API and API Integration? (for non-technical people) | Manchester Digital
Cpmc Mission Bernal Campus & Orthopedic Institute Photos
DPhil Research - List of thesis titles
Overnight Cleaner Jobs
Did 9Anime Rebrand
Die Windows GDI+ (Teil 1)
Plus Portals Stscg
Volstate Portal
Decaying Brackenhide Blanket
Sunday World Northern Ireland
Dark Souls 2 Soft Cap
Garrick Joker'' Hastings Sentenced
Valentina Gonzalez Leak
Cooking Fever Wiki
Hca Florida Middleburg Emergency Reviews
Gma Deals And Steals Today 2022
104 Whiley Road Lancaster Ohio
Conscious Cloud Dispensary Photos
Aldi Sign In Careers
Ou Class Nav
Best Uf Sororities
Video shows two planes collide while taxiing at airport | CNN
Edicts Of The Prime Designate
Finalize Teams Yahoo Fantasy Football
Yonkers Results For Tonight
Fleet Farm Brainerd Mn Hours
Mineral Wells Skyward
Marquette Gas Prices
Summoners War Update Notes
Orange Park Dog Racing Results
Bend Missed Connections
Inmate Search Disclaimer – Sheriff
Aid Office On 59Th Ashland
"Pure Onyx" by xxoom from Patreon | Kemono
Springfield.craigslist
123Moviestvme
6143 N Fresno St
Upstate Ny Craigslist Pets
Lake Dunson Robertson Funeral Home Lagrange Georgia Obituary
Bay Focus
Henry County Illuminate
Craigslist Free Manhattan
Shane Gillis’s Fall and Rise
No Boundaries Pants For Men
Alston – Travel guide at Wikivoyage
'The Night Agent' Star Luciane Buchanan's Dating Life Is a Mystery
DL381 Delta Air Lines Estado de vuelo Hoy y Historial 2024 | Trip.com
Motorcycle For Sale In Deep East Texas By Owner
Blog Pch
Cvs Minute Clinic Women's Services
Deshuesadero El Pulpo
Latest Posts
Article information

Author: Domingo Moore

Last Updated:

Views: 6045

Rating: 4.2 / 5 (73 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Domingo Moore

Birthday: 1997-05-20

Address: 6485 Kohler Route, Antonioton, VT 77375-0299

Phone: +3213869077934

Job: Sales Analyst

Hobby: Kayaking, Roller skating, Cabaret, Rugby, Homebrewing, Creative writing, amateur radio

Introduction: My name is Domingo Moore, I am a attractive, gorgeous, funny, jolly, spotless, nice, fantastic person who loves writing and wants to share my knowledge and understanding with you.