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.
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.
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.
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.
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.
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"
> 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.