Skip to content
ExcelExcel 2013+

WEBSERVICE function in Excel

Returns data from a web service.This function is not available in Excel for the web.

=WEBSERVICE(url)

WEBSERVICE syntax and parameters

One argument, one required.

  • urlstringRequired

    The URL of the web service to be called

WEBSERVICE examples

Formulas you'll actually reuse.

  1. The raw response body of a GET request, as text:

    =WEBSERVICE("https://example.com/api/rate?from=EUR&to=USD")
  2. Fetch, extract, and convert to a number in one cell:

    =VALUE(FILTERXML(WEBSERVICE("https://example.com/rates.xml"), "//rate[@currency='EUR']"))

WEBSERVICE in Google Sheets

No direct equivalent — here's the way around.

Try WEBSERVICE in the playground

Edit the example — nothing to install.

Preloaded with the WEBSERVICE formula from Example 1 — change anything and watch it respond.

Loading the editor…

WEBSERVICE errors

What they mean — and the fixes.

  • #VALUE!

    The response isn't text, exceeds 32,767 characters, or the URL uses a protocol other than http/https — Excel also can't call APIs that need authentication headers.