Extracting Data using REST API from Excel VBA

dhancy

Board Regular
Joined
Jul 10, 2013
Messages
123
Office Version
  1. 365
Platform
  1. Windows
Hello,

This is a bit out of my league so I apologize in advance if I am not using the right jargon here.

We have a system which, as I understand it, has data that can only be retrieved externally using REST APIs. I have written VBA scripts many times to extract Oracle data using SQL, but I have no experience using REST APIs. I therefore, have many how to questions about this. But for starters, is it possible to use REST API calls from Excel VBA? And if so, can someone give me a high level overview of how to start? Perhaps a simple example of this would help me get me started. I suspect there will have to be some means of connecting to a web site or server, and perhaps a user ID and password would have to be supplied as well. Once that connection is made, I suspect I'd code a simple query whose results can be written to a spreadsheet.

Any suggestions you can provide will be greatly appreciated.

Thank you!

Dennis
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I think you're referring to sending GET, POST etc. requests to a http URL and handling the response. This can be done from VBA using the XMLHTTP object. See this example for the Google Directions API:

 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,177
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top