Chapter 24. Getting Data from the Web

Today it is hard to remember a time when the Web didn’t matter, but it wasn’t that long ago that it didn’t even exist. Because Excel was created long before the Web existed, it has adapted as the Web evolved. There are now three main approaches to retrieving data from the Web:

Web queries

Retrieve data directly from a web page and import that data into a query table on an Excel spreadsheet. Although this was one of the first web access features added to Excel (introduced in 1997), it is still very useful.

Web services

Execute applications remotely over the Web to return results in XML format. The number of services available over the Web is growing quickly as this standard is becoming broadly adopted. Web services provide a standardized way of exchanging parameters and retrieving results over the Web—something that is missing from web queries .

Database access over the Web

Is now available through most database software. Since the Internet is like any other computer network, this technique is much the same as database access over a local network and is not covered in this chapter.

This chapter describes how to use web queries and web services to retrieve data from the Web and import it into Excel. The samples in this chapter demonstrate a variety of programming tasks with these two approaches, including passing parameters, formatting results, getting data asynchronously, and displaying results through XML maps.


Code used in this chapter and ...

Get Programming Excel with VBA and .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.