Generating kml files from excel data

13,224 views
Skip to first unread message

Munir_Afsar

unread,
Oct 23, 2005, 3:28:10 PM10/23/05
to KML Discussions
Is there a way to generate kml files from excel data?
I have an excel file which has one column each for a file name, loc of that file on computer and coordinates for north, south, east and west corners of the file (air photo). How a separate kml file can be generated from each row of data?
Any thoughts are welcome.

Bradsd

unread,
Oct 24, 2005, 2:43:37 AM10/24/05
to KML Discussions
I'm no expert in Excel but I know it would be fairly easy to create a KML file using the data as you have described.

What I do not know about is creating a separate file for each row of data. I'm not real sure how that could be done easily.

I have created some pretty complex and dynamic files using Excel. It's best to learn as much as you can about the program. It's a very powerful program and there is not much that you can't do with it. I've learned everything I need to do by using the help files and searching the net for answers and solutions.

I might be able to help you create one huge KML file with a folder for each row of data, but I do not know how to automatically create separate files for each.

Munir_Afsar

unread,
Oct 24, 2005, 7:58:04 AM10/24/05
to KML Discussions
Thankyou for the guidance. Any help to create one file as you described is warmly welcome.

Thanx

iftcoach

unread,
Nov 12, 2005, 7:23:19 AM11/12/05
to KML Discussions
Hi,

you can use PHP together with e.g. Excel Eplorer Class.

Coach

Forkboy2

unread,
Nov 12, 2005, 11:02:31 AM11/12/05
to KML Discussions
Easiest way for the PHP challenged among us might be to use the Mail Merge feature of MS Word. Create a template in Word with this format that reads the different fields from the Excel file.


<GroundOverlay>
<name>XXXIMAGE NAMEXXXX</name>
<visibility>0</visibility>
<Icon>
<href>XXXXFILE LOCATION OR URLXXXX</href>
</Icon>
<LatLonBox>
<north>XXXNORTHXXX</north>
<south>XXXSOUTHXXX</south>
<east>XXXEASTXXX</east>
<west>XXXWESTXXX</west>
</LatLonBox>
</GroundOverlay>

Then just export it as a plain text file.

One thing to also consider is whether you want an index of the maps to show up in Google Earth. Take a look at the KMZ file that I made attached to this topic for some options on how to do an index.

http://bbs.keyhole.com/ubb/showflat.php?...&PHPSESSID=

The folder caled "Historic Topos - 15" has one type of index system and the folders with "NEW" at the end use a different index system. They both have advantages and disadvantages, but I prefer the one that uses placemarks instead of polygons.

Also, remember that the size of your source images are important. If they are bigger than 2,000 x 2,000 they won't work very will in GE.

Matt

lucifer666

unread,
Nov 17, 2005, 8:44:07 AM11/17/05
to KML Discussions
Here is the solution using only Excel!!!!!
That's how i do it.

Generate the complete KML Information in an excel sheet.
Each line of the KML comes into one cell!

This way you can in a very simple way include your coordinates and other informations in the KML information

Then you copy the sheet to a new workbook and save this new document with save as "formated text (space separated) *.prn"

That is your ready to use kml file


Here the required Excel VBA code:


sub save_KML()
Set fs = CreateObject("Scripting.FileSystemObject")


; define the filename for the KML file

filename= "D:\temp\Google Earth\example.kml"

;delete the file if it exists otherwise Excel will ask for confirmation

If fs.fileexists(filename) Then
fs.deletefile filename, True
End If

; Copy sheet "KML" to a new workbook

Sheets("KML").Copy

;Save the workbook to the KML file and lose the woorkbook to
;return to your original.
; Use a new workbook to be able to continue working in your
; original file otherwise the sheet name is changed to "filename"

ActiveWorkbook.SaveAs Filename:=filename, _
FileFormat:=xlTextPrinter, CreateBackup:=True
ActiveWorkbook.Close (False)

end sub


Regards

KaMeLwriter

unread,
Oct 1, 2006, 11:11:28 AM10/1/06
to KML Discussions
www.kamelwriter.com

Links in Excel data as ranges and loops through every cell in the range to generate large KML files from your Excel data.

Enjoy!
620507-AllBanksinSouthKorea.kmz

zonums

unread,
Oct 1, 2006, 11:49:11 PM10/1/06
to KML Discussions
Free and simple to use.

http://www.zonums.com/excel2GoogleEarth.html

Just select the data, choose the file name and that's it.

René Marcial Reyes Olivera

unread,
Oct 20, 2012, 1:52:41 PM10/20/12
to kml-support-g...@googlegroups.com
Hello here you can find two online applications for working with kml files:

The first one, creates kml files based on Excel or CSV file

The other, reads kml files and output it on a CSV file

Regards,

René

rethois

unread,
Oct 28, 2013, 1:13:00 PM10/28/13
to kml-support-g...@googlegroups.com
Kml-Creator has been updated and it can be found in this URL:


Now it allows additionally to add extended (custom) data to Google Earth, just uploading a CSV file. The application is here:


Also you can convert massively you coordinates, among the same sistem from UTM or geographic or viceversa using this application.


Goog Luck

Velliah Manohararaj

unread,
Feb 13, 2014, 4:23:53 AM2/13/14
to kml-support-g...@googlegroups.com
You can create KML file from excel itself. No GIS software is necessary. Just visit the web page  http://mksugumaran.blogspot.in/2013/09/excel-to-google-earth-kml.html, download the macro enabled excel spreadsheet, fill up your location data and run the macro. That’s all.
Reply all
Reply to author
Forward
0 new messages