I remember a Facebook post I read sometimes ago "Google
Earth lets you explore the whole world, but you go and try to locate your own
little house".
Well! that was true for the first few times but not
any more for me. I work with a lot of Geo-spatial data processing and
visualization and exporting my data to Google Earth is often one of the
choices. I had to struggle a lot to view my MS Excel data in Google Earth.
Here is a little tool I created to export Excel table to a
kml file which can be opened in Google Earth. Hope you will find it useful.
You can download the Excel file here:
These are Macro enabled Excel files. The underlying VBA
codes are visible, you are welcome to use the code and the worksheet.
If you find any bug in the code, post it in the comments
below I will try to help you out!!
Here are few tips:
- Download the
proper version of the file and open in Excel. If the macro security is not
set to Low, you will be asked to Enable macros. Go ahead and enable the
Macros.
- Latitude and
Longitudes must be in decimal degrees (see sample data)
- Use negative
for Western Longitude and Southern Latitudes (see sample data)
- Latitude and
Longitude must be present and in columns 2 and 3 for this tool to work.
- You can have
maximum of 10 attributes at each point (i.e. columns D through M) but it
is optional and you can 1 or 5 or 10 or none attributes. You can also have
different number of attributes for each location. These attributes are
shown as tables at each location (Click on balloon to expand the table)
- You can have
as many number of points as needed
- Change title
or header (Row 1) of attributes as needed
- Values in the First column
will be used to display the name of locations on Google Earth window (See
sample image), change as needed.
- If Google
Earth is installed on a different location than C:\Program Files
(x86)\Google\Google Earth\client\googleearth.exe , then the macro will ask
you to one time locate the googleearth.exe manually
Once you export the data, the macro will open it
automatically in Google Earth (As long as Google Earth is installed on your
computer). Based on the location of Google Earth executable, this tool might
ask you to locate the googleearth.exe file for the first time and it will
remember the location afterwards)
Cheers!!
Smile and Live Happy!
3 comments:
hi,
This tool is very useful in my job and its working before...but now its not working:( it appears this prompt message after saving the excel file.
Hope you help me fixing this please;
Google Earth
Could not open file Address\F.kml for reading
thanks.
necie
necie,
Glad that the spreadsheet helped you. If the file name you exported to was "Address\F.kml " as you have written, I think the "\" character you have in the name is causing the problem. Please correct me if I am wrong.
Generally it is not a good idea to use characters such as ?*;,/\+ etc in a file name.
File is Giving error..Compile error...Object not found
Post a Comment