0

I'm trying to figure out a way to pass variables into cURL commands (maybe this will interact with Ubuntu, or the CMD window, or something else; not totally sure).

I have some cURL commands like this:

curl -X "GET" -H "Authorization: Bearer API_Key" "https://url-plat-api/drives/my"

Now, I want to pass in my API_Key ID and run the cURL command.

Also, I have some cURL commands like this:

curl -H "Authorization: Bearer API_Key" "https://url-plat-api/identities/email/me@gmail@corp.com"

Here, I want to pass in the API_Key and the emailID, and run the cURL command.

How can I run these cURL commands in Excel? Eventually I will select items from a ComboBox, and pass these variables into a VBA command, and run that. I can do these things very easily. How can I set up the VBA script to interact with cURL?

halfer
  • 19,824
  • 17
  • 99
  • 186
ASH
  • 20,759
  • 19
  • 87
  • 200
  • 2
    Nothing really built into Excel. [This question](https://stackoverflow.com/q/26681866/4996248) or [this question](https://stackoverflow.com/q/17063550/4996248) might help. – John Coleman Sep 24 '18 at 15:48
  • 1
    In addition to what @JohnColeman provided, which is probably the way to go, if you really want to use cURL, then you can write curl commands into `.bat` files and run those via vba. – Scott Holtzman Sep 24 '18 at 16:06
  • 1
    What is the end purpose and can these not be replaced with WinHTTP/XMLHTTP requests? You are familiar with these so I guess there is a reason. – QHarr Sep 24 '18 at 16:10

0 Answers0