Here’s my first attempt at using Google maps in excel (download below). Currently I can input an address and have a Google map of the address displayed in Excel, with most of the cool google functionality.
A couple thumbnails of the Excel Google Map Spreadsheet, click to view the larger images.
The Google Map Spreadsheet uses two API’s to work, the Geocoder.us Api and Google Maps Api. I thought about also throwing in the current weather report, but refrained for now.
So how does it work?
Summary:
1. The address is sent to Geocoder.us to be converted to Latitude and Longitude (required to map a location on google maps), and the result is returned to the spreadsheet.
2. Excel sends this geocoded information to the automateexcel.com server, where I have a google map that receives latitude and longitude as variables and displays the respective map via the Google Map API.
3. Finally there’s a web browser control in Excel that navigates to this new address.
A bit more:
1. To experiment with sending an address and having Geocoder.us return the Latitude and Longitude back to Excel, I created a Geocoding workbook to experiment with.
2. Click this link to see my webpage that receives latitude and longitude as variables and returns the respective map (look in the address bar). If you’d like to create a similar page you can view my page code here: googlemap.txt. (Yep, it’s hacked together. Remember to input your own Google API Key in the Head section.)
3.I set margin:0px to remove the whitespace around the map, trying to make it look less like a web browser control and more like a google control.
Requirements
To use the spreadsheet you’ll need Excel 2003. That’s what I’ve tested it on, for Excel 2002 I believe the “import vba code” is slightly different and minor tweaking will be needed.
To create your own solution you’ll need a Google Developer Key, a Website to host the page, and Excel 2003.

Click this link to download the Google Map in Excel Spreadsheet
Update:
A Canadian Google Maps In Excel that works with pre-2003 Excel versions.
Random:
-You can do much more with google maps than just plotting points, I particularly like this example: gMap Workout Tracker
-Microsoft unveiled their new mapping service this week: Virtual Earth (Opens in new window since they have the back button disabled). The satellite imagery in my neighborhood is much nicer than google maps, and the interface has some additional cool tricks. I haven’t tried the virtual earth api yet.


July 30th, 2005 at 2:22 pm
A very good idea, heck I must get new gear and upgrade though!
Ossie
August 14th, 2005 at 8:43 am
Very cool. How about Word? Can’t wait till they get better data for the rest of the world.
August 17th, 2005 at 1:14 pm
Haven’t tried using gmaps with word, I’m sure it couldn’t be that difficult.
September 15th, 2005 at 1:45 am
hi mark…
very cool thang……
how’bout darmstadt, germany, home of the european space agency??
best,
wolfgang
September 20th, 2005 at 11:21 am
I modified your code and wrote a small demo for Excel 2000/97 users. It does not have the XML parser so I just used the Microsoft XML version 3. It also has the code for Canada using the geocoder.ca web site. Please let me know if you want to have a look.
September 20th, 2005 at 5:49 pm
Hey Gyula,
Sounds great, you want me to post it or just have a look?
I currently don’t have any version other than 2003 installed so I don’t know if it will work here(transitioning some things), but I’d give it a whirl and others might possibly be interested.
Mark
September 20th, 2005 at 8:25 pm
Sure thing. It seems to work on Excel 2002 (i tried on my home PC), as well. I asssume it is because MS has downward compatibility (Microsoft XML version 3 library is intalled by default). I will email it to you tomorrow and feel free to post it. All code is freely available and any suggestions for improvement will be greatly appreciated.
Your blog is awesome. Keep up the good work!
Gyula
December 20th, 2005 at 8:16 am
Mark:
This might be the solution that I’m looking for. I’m trying to figure out how to mass upload a decent-sized Excel dataset (~6,000 physical addresses) into discrete Google maps for use on a website that I am working on. I need to dig into your work more, but does this seem feasible? I have everything from zip code to individual street address for each entry.
December 20th, 2005 at 3:18 pm
why not just import the spreadsheet into a mysql database and work from there?
August 2nd, 2008 at 10:27 pm
[...] - Google Maps In Excel Filed Under: [...]
August 14th, 2008 at 6:44 pm
[...] Gulyas took my original Google Maps in Excel and made two changes to it that some readers may be interested [...]
August 14th, 2008 at 6:46 pm
[...] To answer your question “beyond the neato factor, would one use an Excel sheet with an embedded Google map“: [...]
October 20th, 2008 at 9:46 pm
Is it possible to add (like I tried below) something like ‘z= 25′ in the URL to directly get an desired zoom-level?
WebBrowser1.Navigate (”http://www.automateexcel.com/pl/googlemap.php?lon=” & mylat1 & “&lat=” & mylon1 & “&z=25″)
Would be nice!