Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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.

Argument

Description

url   

Required

The URL of the web service to be called

Notes: 

  • 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.

Example

Here's an example using a fictitious webservice:

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

Tips: 

  • For the best results, the URL for WEBSERVICE should be encoded before prior to inclusion in the formula.

  • To encode a URL, use the ENCODEURL function. Then reference the cell with the encoded URL in the WEBSERVICE formula.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

See Also

ENCODEURL function

FILTERXML function

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×