Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call web service in excel

In a VBA module in excel 2007, is it possible to call a web service? If so, any code snippets? How would I add the web reference?

like image 661
Jeremy Avatar asked Jan 23 '09 22:01

Jeremy


People also ask

Can Excel call a web service?

Yes You Can! And just in case anyone is wondering: No, this isn't available on reasonably recent Excel versions. :( And just in case anyone is wondering, web service calls are part of VBA, which is available in recent versions, it's part of Excel's development suite, hidden by default.

How do I connect to a webservice in Excel?

You can do this by finding the URL of the web service or by finding the API key or username and password needed to access the service. Once you have the URL or key, you can enter it into the WEBSERVICE function in Excel. Excel will then connect to the web service and return the data.

Can Excel make an API call?

Calls to external APIs can only be made through the Excel application, not through Power Automate under normal circumstances.


1 Answers

Yes You Can!

I worked on a project that did that (see comment). Unfortunately no code samples from that one, but googling revealed these:

How you can integrate data from several Web services using Excel and VBA

STEP BY STEP: Consuming Web Services through VBA (Excel or Word)

VBA: Consume Soap Web Services

like image 169
Mostlyharmless Avatar answered Oct 06 '22 01:10

Mostlyharmless