WEBSERVICE function

The WEBSERVICE function returns data from a web service on the Internet or Intranet.

Notes: 

  • The WEBSERVICE function is only available in Excel 2013 and later for Windows.

  • The WEBSERVICE function may appear in the Excel for Mac function gallery, but it relies on Windows operating system features, so it will not return results on Mac.

Syntax

WEBSERVICE(url)

The WEBSERVICE function syntax has the following argument.

  • url    Required. The URL of the web service to be called.

Example

=WEBSERVICE(“http://mywebservice.com/serviceEndpoint?searchString=Excel”) 

You can also use the ENCODEURL function in conjunction with the WEBSERVICE function. For example:

=WEBSERVICE("http://xml.weather.yahoo.com/forecastrss/"&ENCODEURL(B2)&"_f.xml")  

Remarks

  • If arguments are unable to return the data, WEBSERVICE returns a #VALUE! error.

  • If arguments result in a string that is not valid or that contains more than the allowable cell limit of 32767 characters, WEBSERVICE returns a #VALUE! error.

  • If url is a string that contains more than the 2048 characters that are allowed for a GET request, WEBSERVICE returns a #VALUE! error.

  • For protocols that aren’t supported, such as ftp:// or file://, WEBSERVICE returns a #VALUE! error.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

Expand your Office skills
Explore training
Got It
Get instant Excel help
Connect to an expert now
Subject to Got It terms and conditions

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×