![rest api vba rest api vba](https://i.stack.imgur.com/u8Wmd.png)
![rest api vba rest api vba](https://marquesfernandes.com/wp-content/uploads/2020/03/Untitled-Design.jpg)
Installation is very simple, just download the latest version here and in the macro editor go to File > Import File > JsonConverter.bas. Importing the VBA-JSON libraryĪs the API we're going to query returns a JSON as an answer we will need to import the library VBA JSON, it will take care of all the boring work of translating the JSON and returning as an array and object. Creating the macro to query the APIīy shortcut alt + f11 let's open the Excel macro editor, and create a module called list pokemons.
![rest api vba rest api vba](https://image.slidesharecdn.com/scriptdbcomprimer-131212082329-phpapp01/95/vba-api-for-scriptdb-primer-21-638.jpg)
Creating a blank worksheetįirst let's create a blank sheet with macro enabled, inside it I'll create a tab called results. Our goal will be to consult a Public Pokemon API and list the result in the tab results. This article hopes you will know the basics of Excel and VBA, as well as what is an API and how it works.
#REST API VBA HOW TO#
Let's learn how to query Rest APIs using VBA and convert the result to JSON for use in the spreadsheet. APIs allow easy access to information in systems, which is becoming more and more standard in the market, with that in mind, some demands of connecting to systems via API in Excel are necessary and very useful, so I decided to share a little how I created this integration. Excel is probably one of the most used tools in this world, so the demand for integrations with extremely complex spreadsheets is a recurring scenario.