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.
The raw response body of a GET request, as text:
=WEBSERVICE("https://example.com/api/rate?from=EUR&to=USD")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.
Related functions
More ways Excel gets this done.
- ENCODEURLReturns a URL-encoded stringThis function is not available in Excel for the web.WebGoogle Sheets
- FILTERXMLReturns specific data from the XML content by using the specified XPathThis function is not available in Excel for the web.WebNo Google Sheets equivalent
- ABSReturns the absolute value of a numberMathGoogle Sheets
- ACCRINTReturns the accrued interest for a security that pays periodic interestFinancialGoogle Sheets
- ACCRINTMReturns the accrued interest for a security that pays interest at maturityFinancialGoogle Sheets
- ACOSReturns the arccosine of a numberMathGoogle Sheets