Microsoft Office Tutorials and References
In Depth Information
Examples of Web Functions
Examples of Web Functions
Excel 2013 introduces the WEBSERVICE function and two helper functions. The
ENCODEURL changes reserved characters in a URL string to their percent-
encoded equivalents. FILTERXML helps you to parse out the results from
the WEBSERVICE function. FILTERXML uses the XPath language to retrieve
data from an XML data set.
To get started, you need to find a free web service that returns results in
ATOM or JSON. From there, be prepared to do some experimenting before things
begin going smoothly.
The examples in this section are from the Twitter Application Programming
Interface. The documentation at is
quite helpful. It tells you how to build a successful URL at the regular
Twitter search page and how to convert that URL to an API URL.
For example, to find the last 15 tweets about VLOOKUP, you would end up
at the URL of!/search/vlookup . The Twitter API docu-
mentation says that you want to convert this to
search.atom?lang=en&q=vlookup .
to Replace Reserved Characters
Certain characters cause problems in URLs. In particular, many occur-
rences of !#$& ()*+,/:;=?@[] need to be encoded. For example, instead of an ex-
clamation point, you need to use %21. Unless you have memorized the com-
plete list, it is easier to use ENCODEURL to encode those characters. Figure
12.44 shows the complete set of reserved characters and the result of using
ENCODEURL to convert them.
ENCODEURL to Replace Reserved Characters
Figure 12.44.
Figure 12.44. If necessary, encode the arguments for your web service URL.
If necessary, encode the arguments for your web service URL.
Search JabSto ::

Custom Search