Open Google Earth from MS Excel

5,700 views
Skip to first unread message

simon_a

unread,
Jan 28, 2007, 5:48:59 PM1/28/07
to KML Discussions
Hello,

Here's an example of opening a location in Google Earth directly from MS Excel using a VBA macro.

The spreadsheet contains a data sheet - wth names, lan/long pairs and descriptions - and a control sheet with the kml code and file details. Click on the "Open in GE" link on a row to open those co-ordinates in directly in GE.

Make sure that the "temp dir" value is set to a suitable temporary directory and that the path to the GE executable is correct (this will probably be different to the default if you are using GE Pro; I've put little error handling in so the macro will just break if it's not right).

See also the Excel to KML converter, which creates a kml file for all locations in a spreadsheet:
http://bbs.keyhole.com/ubb/showthreaded.php/Cat/0/Number/613667

Disclaimer: This is provided 'as is' with no support or guarantees etc. Care should be taken opening any file including a macro - I've no reason to suspect that it contains a virus (I should hope not - that means my PC is infected!) but I still suggest scanning with an anti-virus tool just in case.



Simon.
774351-GEfromExcel.zip

wpo1000

unread,
Mar 21, 2007, 6:44:18 PM3/21/07
to KML Discussions
I may be being daft, but I couldn't find the attachment anywhere. Sorry if I've missed something obvious.....

simon_a

unread,
Mar 21, 2007, 7:40:08 PM3/21/07
to KML Discussions
Hello,

Welcome to the GE Community!

No, don't worry; it's not all that obvious. You need to click on the 'View in Google Earth' link - even though you're not going to! This is because most attachments are placemarks to be viewed in GE but in this case, it's just a zip file.



Cheers,

Simon.

Angelica Guzman

unread,
Feb 21, 2014, 3:37:22 PM2/21/14
to kml-support-g...@googlegroups.com
How did you make the link on excel, to open on google earth?

Avinash D

unread,
Jul 23, 2014, 8:11:48 AM7/23/14
to kml-support-g...@googlegroups.com
What does "temp dir" means. GE Path is set accurately. What does this temp directory mean

AMD ALI

unread,
May 23, 2015, 8:49:13 AM5/23/15
to kml-support-g...@googlegroups.com
thanks for your help & effort
but i am beginner in vba so can you help in this error i attached



error.png
Reply all
Reply to author
Forward
0 new messages