Use Excel VBA to Read API Data

Поділитися
Вставка
  • Опубліковано 27 сер 2024

КОМЕНТАРІ • 151

  • @TuncanGaming
    @TuncanGaming 11 місяців тому +1

    I didn't know anything about VBA and was able to do what I wanted to just by watching your video. Great work, thank you so much!

  • @Excelmacromastery
    @Excelmacromastery  2 роки тому +12

    Learn how to write real-world Excel VBA code: 👉courses.excelmacromastery.com/
    I hope you enjoy my new video. Please let me know if you plan to use Web APIs.
    *Important Note:* To use each API on the RapidAPI website you must subscribe on the API page.

    • @Excelmacromastery
      @Excelmacromastery  2 роки тому +2

      @@yashchawla8360 Thanks yash. I hope you like it.

    • @bogdanexit1
      @bogdanexit1 2 роки тому

      I will use in Microstrategy

    • @quoctam1719
      @quoctam1719 2 роки тому

      I plan to use API on price comparision website

    • @JasonTorpy
      @JasonTorpy 2 роки тому

      question - what about customers? I do a lot of paid freelance work with VBA (and Google script) but I've always avoided any addons as customers might not have Scripting Runtime or WinHTTP loaded). Is that a concern? Any suggestions on how to ensure a client has those addins added... maybe an auto-load button?

    • @madschedules
      @madschedules 2 роки тому

      Hi @@JasonTorpy , you can do it with late binding so that your clients don't need to turn on the reference library needed.

  • @kolavithonduraski5031
    @kolavithonduraski5031 2 роки тому +5

    next level VBA 👍

  • @edrobinson8248
    @edrobinson8248 2 роки тому +1

    good stuff. hope beginners realize that is for a specific (web) api . Not generic API's.

  • @magalisantos5544
    @magalisantos5544 Рік тому

    Thanks very much for this tutorial!! I created a macro which retrieves data from an API and thus it saved me lots of hours (~6h) from checking them individually!! Thank you VERY MUCH AGAIN!

  • @tgirard123
    @tgirard123 2 роки тому

    Easy as 1-2-tree. Thank you so much. I could not figure this out for the life of me. Now I got a working sheet!!

  • @oz7075
    @oz7075 2 роки тому +1

    I was preparing a series of videos to upload to my upcoming UA-cam channel and one of them was APIs. Interesting. I have a project of mine which uses a WebAPI from an Online dictionary.

  • @guidopiotrowski7114
    @guidopiotrowski7114 Рік тому +2

    Incredible video, super clear, and great teacher. Thanks!

  • @shinrafahell
    @shinrafahell 2 роки тому +9

    Hey Paul, great video as always! Any chance to have a tutorial explaining how to get apis that utilizes oauth such as Google sheets or Twitter? Thanks!

    • @phonesolo8513
      @phonesolo8513 2 роки тому +1

      Exactly what i need.

    • @MyAudioBookCompilation
      @MyAudioBookCompilation 2 роки тому

      This is the last wish that i want to achieved. To learn to modify google sheets using vba.

    • @shinrafahell
      @shinrafahell 2 роки тому +1

      @@MyAudioBookCompilation using python it is a breeze. Unfortunately I didn't find anything related to vba.

    • @MyAudioBookCompilation
      @MyAudioBookCompilation 2 роки тому

      @@shinrafahell I see. Thank you. Python and JavaScript are in my list but sometimes we still want to achieved what we really want to achieved. 😁 I know that learning to manipulate google sheet using VBA might be overkill but that what makes us happy. Anyways thank you for the info i think i will try to learn if first.

  • @marcellino53
    @marcellino53 4 місяці тому

    Awesome job.. Thanks, and greetings from Brazil !

  • @saxena1955
    @saxena1955 2 роки тому +5

    Hi Paul ,
    Great video. Can you make it a dynamic code to read data of any api and write it to excel ? Please explain it in next video . Thanks

  • @bongzsmalawu1614
    @bongzsmalawu1614 Рік тому

    Thank you so much, this has made things lighter for me, I have no programming background, but was looking forward to leverage this lesson to help me import run statistics from strava, garmin connect and polar websites for my team.

  • @mikem8915
    @mikem8915 Рік тому

    Solid video. Shows exactly what you should do for a given objective.

  • @trueevilangel
    @trueevilangel 2 роки тому

    thank Paul , you explained it easy to understand.

  • @wayneedmondson1065
    @wayneedmondson1065 2 роки тому +4

    Hi Paul. Very cool tutorial! Thanks for access to all the resources used. I worked through the name example and connected successfully with the same results. Can't say I totally understand it all yet, but it's a great start. Always something new and interesting at Excel Macro Mastery :)) Thumbs up!!

  • @DLAmurph
    @DLAmurph 2 роки тому

    This example blew me away very informative and helpful, thank you Paul

  • @chrisouellet2832
    @chrisouellet2832 9 місяців тому

    thanks for this tutorial Paul!! this one is very cool!!!

  • @davidlinesq
    @davidlinesq 2 роки тому

    Thank you so much for this video. This has helped me with a program that I needed to create for work. One request for a follow up video would be how to make paginated api calls and combine the results into one array. Thanks as always!

  • @garethwoodall577
    @garethwoodall577 2 роки тому

    Excellent explanations (as usual). Good teacher! Thanks Paul *

  • @CivilEngSpreadsheets
    @CivilEngSpreadsheets 2 роки тому

    Hi Paul! I'm learning a lot from your channel. Would really appreciate if you could do a tutorial about VBA and Google Drive API like how can you use VBA to upload or download a file from Google Drive.

  • @itsmeforsure5475
    @itsmeforsure5475 Місяць тому

    Excellent!!!

  • @kevinbezant8972
    @kevinbezant8972 2 роки тому +3

    Very interesting video, Paul. I'm currently using Integromat to integrate web apps. Whilst Integromat is very good, I feel I could do with having more control and your video has got me thinking! A follow-up video on writing to an API would be useful.

    • @jjtagh
      @jjtagh 2 роки тому +1

      Also some examples writing to API using GraphQL (mutation) as well as REST API would be fantastic.

  • @hf2138
    @hf2138 2 роки тому

    Thanks for a great video Paul, keep it up

  • @anthonypasslow1933
    @anthonypasslow1933 2 роки тому +1

    Great job as always, thank you Paul

  • @rajesh321r
    @rajesh321r 2 роки тому +2

    This is awesome👍
    Happy to learn APIs and how to use with VBA.

  • @Algoreborn
    @Algoreborn Рік тому

    THANK YOUUUUU, you made my day...

  • @Monduras
    @Monduras 2 роки тому +1

    Outstanding as always! Bravo

  • @vbaclasses3553
    @vbaclasses3553 2 роки тому

    Awesome video, thank you. Will make time to work through it all.

  • @ashkumar8797
    @ashkumar8797 Рік тому

    Great video, thanks for sharing and explaining

  • @simondechoisy779
    @simondechoisy779 2 роки тому +1

    Really looking forward to this

  • @fredrodriguez963
    @fredrodriguez963 2 роки тому

    Hi Paul, very good stuff. Thank you.

  • @fairosabdulmutalip641
    @fairosabdulmutalip641 2 роки тому

    Hi Paul, love your tutorial

  • @briandelaney6354
    @briandelaney6354 2 роки тому

    Hi Paul, I had no idea you could use VBA for this purpose! Thanks for sharing the knowledge 😀😀

  • @nickroe5992
    @nickroe5992 2 роки тому

    Thanks, that was a very good tutorial

  • @bernardoezeta2531
    @bernardoezeta2531 2 роки тому

    Hi Paul! Thank you so much!

  • @Rice0987
    @Rice0987 2 роки тому +1

    By chance 've read this: "Programs must be written for people to read, and only incidentally for machines to execute". :)

  • @johnsmith2771
    @johnsmith2771 2 роки тому

    Great video, thank you so much for posting this, really helps

  • @aNDy-qh1em
    @aNDy-qh1em 2 роки тому

    15:35 It could be a mixture of dictionaries/collections and also classes . 'Country' could well be a class. But that is a matter of preference - for simplicity reason that is ok. When using s dictionary I would verify if the key-value pair exist. A great tutorial, thak you

  • @luismejia6817
    @luismejia6817 2 роки тому

    This is so awesome. I’m gonna. Be working on a lot of personal projects from this rapidapi website. I’m a data analyst so I’ll be inserting the responses in a database :)

  • @schmuttergold2296
    @schmuttergold2296 4 місяці тому

    Great video. I have to use a post command and need to pass a JSON request together with the http request and headers, How can I do that with VBA?

  • @jesus.moreno
    @jesus.moreno 2 роки тому

    wouuuuuuuuuuuuuuuuuuu amazing ... you got a suscriber to your channel !!!

  • @MrMallesh1
    @MrMallesh1 2 роки тому

    Amazing video ! I liked it , thanks a lot !

  • @caste_
    @caste_ 2 роки тому

    thanks my man your a genious

  • @kingparc
    @kingparc 2 роки тому

    Thank you very much 👍

  • @Abhishekuchagaonkar
    @Abhishekuchagaonkar 2 роки тому

    You are awesome!! (Guruji)

  • @youknowme6780
    @youknowme6780 Рік тому +1

    I am working on a vba to fill web form, it works on first IE page and submit the form, but when a new page loads with different web address, my code don't recognize the active web page...to keep on filling this page Any advice??? No selenium used

  • @solimanalali8048
    @solimanalali8048 2 роки тому +1

    A very interesting lesson. My question is, I want to create an invoice automatically. I want to create a QR code on the same invoice, and when scanning the code, the same invoice appears.

  • @farahinrosli7244
    @farahinrosli7244 Рік тому

    hi can you do to copy data from private apps then paste it in excel, also include the screenshot of data and paste in the excel too, but for this it included multiples data to do in one sheet before move to next sheet

  • @MarceloCutin
    @MarceloCutin 2 роки тому

    Great video!!! Congrats!

  • @Ashokkumarg8
    @Ashokkumarg8 Рік тому

    That is awesome, but can you tell how did you make those two API examples currencies & recipes from the excel

  • @fernandobravo2886
    @fernandobravo2886 2 роки тому

    this is great, one question could be how would you do it with a POST request, that also you need a request body website, that is very common within intranet company's websites.

  • @hain.v.h5744
    @hain.v.h5744 2 роки тому

    Thank your video.

  • @sofianemeriane
    @sofianemeriane Рік тому

    thanks for sharing!

  • @thomy0319
    @thomy0319 2 роки тому

    Wow , que impresionante! 👏👏

  • @rbloesser9009
    @rbloesser9009 2 роки тому +1

    It would have been nice to get more specifics on how to get an API Key. The Rapid-site is very confusing for a beginner. I could not run your code because I could not figure out how to get an API Key.

  • @elricho72
    @elricho72 2 роки тому

    Excellent video and explanation, I ask you seeing the use of the api, could we make it possible for us to interact with VBA to upload or download files from google drive?

  • @halforman6726
    @halforman6726 Рік тому

    Great video. Your channel is awesome. How can I use a private API (requires authentication) in VBA?

  • @The_Code_Father
    @The_Code_Father Рік тому

    Very beneficial video
    I'm trying to build a connection with e invoicing portal in my country using json files and api and they're talking about sth called token
    Could you plz add more detailed tutorial on this topic

  • @buzan.untung
    @buzan.untung 2 роки тому

    Thank you

  • @mas07sencillo
    @mas07sencillo Рік тому

    Thanks for this video! I also have a doubt. How do i handle the API call when the API response have pagination? should i use a for an remake a colletion?

  • @jamcast725
    @jamcast725 Рік тому

    I cant get just a list to print. it doesn't have a key value pair inside but just a list

  • @faiz.ahmad65
    @faiz.ahmad65 Рік тому

    Can you please also tell me how to send parameters along with API Key in Post request?

  • @andriodenavarrete4495
    @andriodenavarrete4495 5 місяців тому

    But how do you add it to th excel sheet?

  • @protostecnologia4096
    @protostecnologia4096 Рік тому

    Wonderful video. Coul VBA connect with a dspace repository? The latest version of dspace repository is made in Angular (front end) and use a backend built on spring boot (java web app)

  • @acidkans
    @acidkans Рік тому

    Hi Paul, great tutorial, with almost zero knowledge i managed to get data of EURO currency from Polish National Bank...but what I'm missing in your tutorial is assigning values to specific cells...for example when I filter a dataset I'd like to paste currency rate to filtered column.....no idea how to do it... I mention that I've this rate but can't paste it...could you help int hat matter? your movies are top quality, great job

  • @scotolivera8207
    @scotolivera8207 2 роки тому

    very informative

  • @jorgevalverdevalderrama5586
    @jorgevalverdevalderrama5586 2 роки тому

    Excellent video and great Spanish name picking UwU

  • @huonggiang537
    @huonggiang537 2 роки тому

    Hi Paul. You can guide How to scrape data from a website that requires login? thank U

  • @vijayalakshmibadigeru4479
    @vijayalakshmibadigeru4479 2 роки тому

    Very useful video thanks.. can we define the jsonconverter in classes..

  • @RMS888168
    @RMS888168 Рік тому

    Would it be possible to see how to implement OAuth 2.0 authentication using the examples in this video?

  • @excelmonkey
    @excelmonkey Рік тому

    Just out of curiosity, how would you store multiple API keys in your module such that the correct key was called by each subroutine?

  • @axelamoe
    @axelamoe 2 роки тому

    Can you make a video for windows api to control an open third party application and get the text?

  • @NaveenKumar-fs3nk
    @NaveenKumar-fs3nk Рік тому

    LinkedIn to scrap using macro is it possible

  • @knowyourdirt1152
    @knowyourdirt1152 Рік тому

    Can you show an example of a post request instead of a get request?

  • @TheSardOz
    @TheSardOz 2 роки тому

    Hi Paul, thanks for the excellent video. How do you catch errors if you have a miss match? If you have a collection of stocks cods and you getting the close price, if one code if not available you’ll have a error and the loop will brake.. how can you skip the error and finish the loop?
    Thank you.

  • @abhiabhiram2855
    @abhiabhiram2855 Рік тому

    Could you please let me know how to get API response text in VBA ? For example for 200 response , response text is ok .

  • @yograjkolhe5225
    @yograjkolhe5225 Рік тому

    How can we parse api response in XML? Is there any library available for the same like VBA-JSON library?

  • @johnstabile9016
    @johnstabile9016 Рік тому

    I'm working on a mac. When you do the references part, is there a mac equivalent to WinHTTP Services. I don't have as many options as you do.
    Thanks,
    John

  • @davidsaw3517
    @davidsaw3517 2 роки тому

    How do you do nested dictionaries?

  • @1rikenpatel
    @1rikenpatel 2 роки тому

    Hi Paul in the example you have used with the name and country, can a filter be applied on the country id so that when a name is selected on data for the filtered country is retrieved? if possible how would I add this to the code?

  • @KLiCuk1
    @KLiCuk1 Рік тому

    Hi Paul, I remember watching this when you first posted it and thought I'd put it on a backburner until I needed it. I just tried downloading the source code but unfortunately the link doesn't work anymore. Is there an up to date link?

  • @TheJaebeomPark
    @TheJaebeomPark 2 роки тому

    Amazing!

  • @tarunprakashsingh
    @tarunprakashsingh 2 роки тому

    hey nicely explained... I am trying to build something where user can define a Get URL and my code can parse any JSON without knowing the Structure and show it in tabular form in excel. How can i do that?

  • @timlambe8837
    @timlambe8837 Рік тому

    Hello,
    is it possible to use Excel as a backend and set up an API with VBA? 🤔

  • @WoottonRivers
    @WoottonRivers 2 роки тому

    This is a really good video. I've had a go at this before but ran into the problem of authentication. I was trying to access data in Xero (the cloud accounting solution). How do you authenticate through VBA if you only have a email address, password and 2FA code? Authentication for other web services creates a similar issue. Suggestions welcome.

  • @gokmensen823
    @gokmensen823 2 роки тому

    we could not find your APIKEY module and without it the excel does not work. could you share with us? module or xlsm excel file? thanks

  • @KhalilYasser
    @KhalilYasser 2 роки тому

    Thank you very much. Awesome tutorial. I have signed up in rapidapi but how can I get the API that I would insert in the VBA code (I couldn't find such API section)

    • @Excelmacromastery
      @Excelmacromastery  2 роки тому

      You have to subscribe to each api you wish to use.

    • @KhalilYasser
      @KhalilYasser 2 роки тому

      @@Excelmacromastery I have tested again now and it is working. Yesterday, something went wrong.

  • @user-pb7zf8tm3x
    @user-pb7zf8tm3x 2 роки тому +1

    can not find the download link of this video

  • @lisah8896
    @lisah8896 2 роки тому

    Hi Paul, Love this but I'm hoping you can help me with something. I can't get the msgbox to display the "request.responsetext. I just get a blank box. If I put the address in a google address box, values return but my message box remains blank. Can you give me some ideas?

  • @bioactiveSaha
    @bioactiveSaha 2 роки тому

    Hi Paul! Thanks for the video. It is very informative. I was able to download and parse json data for small dataset. However, If I try to download complete data (~600,000), excel goes to not responding. I tried with .SetTimeouts 0, 0, 0, 0 and/or waitforresponse but the problem still persist. Any tips? Thanks in advance for your help.

  • @TheGEEKofGAME
    @TheGEEKofGAME 2 роки тому

    With your code about name and countries, I have an error on the line Request.Send and I verify references WinHTTP and Scripting are check…. :/

  • @trillionshares3914
    @trillionshares3914 2 роки тому

    template website "Page not Found"

  • @ReverendZen
    @ReverendZen 2 роки тому

    Hi Paul, thank you for the great video. I had an issue with downloading the source code. I am not sure if the link is broken or if I need to create a login or something. Is there another means by which I can get the source code?

    • @Excelmacromastery
      @Excelmacromastery  2 роки тому

      Can you send me an email? It's Paul at the channel name.

  • @thierryodou4479
    @thierryodou4479 2 роки тому

    Is it possible run R script on VBA?

  • @daves4026
    @daves4026 2 роки тому +1

    Hi Great video thank you for sharing. Cant see the code link though, cant wait to practice this

  • @todddean7722
    @todddean7722 2 роки тому

    The link to the code seems to be broken

  • @MrMallesh1
    @MrMallesh1 2 роки тому

    whats the difference between Extracting data via API and extracting data via web scrapping ! or they both same ! can we use same code for web scrapping !

    • @Excelmacromastery
      @Excelmacromastery  2 роки тому +1

      That's a good question. While they both read from a website they are completely different.
      *Web Scraping*: When you access any website in your browser you are essentially receiving a HTML file from the website. HTML is text and what web scraping does is read through this HTML and extracts data from it.
      *API*: An API is a programming interface created by the website that allows you to access certain functionality. This means you have direct access to the web application with support and documentation.

  • @mwolffe
    @mwolffe Рік тому

    Great video. I'm a little late to the party. :) I followed along several times and tried typing out the code as you went along, but my code failed. I keep getting a Compile error: User-defined type not defined on the 'Dim country As Dictionary' portion of the code. Not sure what I missed. Hopefully you or someone here will have an idea. Thanks!

    • @Excelmacromastery
      @Excelmacromastery  Рік тому

      You need check "Microsoft Scriping Runtime" under Tools->References

  • @tangsh497
    @tangsh497 2 роки тому

    talent

  • @noambrand
    @noambrand 2 роки тому

    The bitly link DOWNLOAD THE SOURCE CODE writes the website is not secure and does not let me download.

    • @Excelmacromastery
      @Excelmacromastery  2 роки тому

      Are you using a company firewall or popup blocker?

    • @noambrand
      @noambrand 2 роки тому

      @@Excelmacromastery company firewall, from home it worked

    • @Excelmacromastery
      @Excelmacromastery  2 роки тому

      @@noambrand Glad you got it sorted Noam.