{"id":4845,"date":"2016-12-04T07:50:42","date_gmt":"2016-12-04T07:50:42","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/wp\/?p=4845"},"modified":"2017-07-18T12:48:57","modified_gmt":"2017-07-18T12:48:57","slug":"google-map-in-excel-using-vba","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2016\/12\/google-map-in-excel-using-vba\/","title":{"rendered":"VBA to Add Static Google Map in Excel Sheet"},"content":{"rendered":"
Dear Readers,<\/p>\n
In this article, I am going to give you a quick tip – how can you add google map in your excel workbook without opening the google map in any browser. More details about this will follow… Google map generator<\/p><\/div>\n Google Static Map API uses a URL which should be in this format: (copied from the above google documentation page)<\/p>\n https:\/\/maps.googleapis.com\/maps\/api\/staticmap?parameters<\/i><\/strong><\/p><\/blockquote>\n There are many possibilities of parameters which can be provided in order to generate your map.. again more details you can find it on above page<\/p>\n For example I am going to take a very basic map of any city of the world and show you how to use this API in excel.<\/p>\n I promise you, it is the simplest code you would ever see to use it in excel for such a cool thing.<\/p>\n Add a rectangle shape (ofcourse you can choose whatever shape you prefer) in your sheet any where you want to display the map and resize it according to your need.<\/p>\n Add a Shape for Map<\/p><\/div>\n Note:<\/strong>You can provide a name to that shape so that you can refer it in your by a relevant name. This is not a mandatory thing to do.<\/i><\/p>\n Follow below instruction to do so…<\/p>\n
\nTo do that I am using Google Static Map API<\/strong><\/a>. I am not going explain you more about this API here as you can already get whole lot of information about this API here on this page… Click here…<\/strong><\/a> At the end of this article you will find a downloadable workbook like below. Where you will be able to generate different Cities map or different type.<\/p>\n
Parameters<\/h2>\n
Step 1. A Placeholder to keep your generated Map<\/h1>\n
<\/a>How to provide a name to the Shape in Excel – you added above?<\/h1>\n