Alot of waste companies use Microsoft Excel to help them with their waste management duties. Excel is a fantastic tool. It isn't a tool that can do everything, do it can do alot! I love excel. And when I worked for a waste management company it was the most verstatile tool at my disposal. And that was before I learned about Visual Basic For Applications (VBA) and well before I learnt about Application Programming Interfaces (APIs). Put those together with Dsposal's Waste Thesaurus and you have one very powerful tool to help you classify waste.
In this article you will learn about how to get an API key, how to download some example code for VBA and how to use that VBA to interact with Dsposal's API. This is just a very simple, relatively easy example of how to use the API to help you with your tasks. There are many more.
Before we begin with classifying waste in Excel using the API, you will need:
Navigate to the Developer Tab
The example file can be downloaded by clicking the button below.
Open the excel file.
When the file loads there will be a Security Warning stating that the macros have been disabled. You will need to enable the content to get the file to work. The file is not password protected and you can investigate the VBA code.
The file contains 5 search terms. When the code runs the file will talk to Dsposal and populate the two blank columns. In the first column (called "Returned EWC Code (Top 5)"), upto 5 EWC Codes will be returned. In the second empty column (called "Returned Entry Type (Top 1)") the EWC Code description for the most accurate ewc code will be returned.
To get this to work you need to:
You can now add additional items into the table and run the code again, and again, and again. Like we mentioned you get 500 calls a month for free.
Please note that the VBA code is written to get a simple result and is not built to provide a business solution. The code requires access to open-source software written by Tim Hall. Their code was based on work by Ryo Yokoyama. This module is called JsonConverter.
Understanding this you can now go and build ontop of these modules to provide you the tools for your work. To find out more we have created the API Documentation to help you understand the building blocks.
Using Dsposal means you know the waste company is licensed. By only using licensed waste companies you help tackle the causes of waste crime.Find a Waste Operations Company