(field?) Problems converting from *.xls to *.kmz

602
2
03-25-2022 02:53 AM
OiledAmoeba
New Contributor

Hi,

we're using ArcMap from ArcGIS Desktop 10.8 Basic.

My goal is to convert Excel-Adresslists (they include also coordinates) to KML/KMZ-files.

The KMZ has to have the same structure like the Workbook has. So I import every single Sheet as table, add x/y-data, export to shape, change "Display" and "Symbology" as needed and finally export these shapes to kml.

This isn't very effective if you need to create dozens of kmz's... The most time is lost during opening every single Sheet and edit Layer Properties. So I tried to use the fields "FolderPath" and "Name" in the Excel-File and import just the "summary"-Sheet.

And there are my problems:
- If I use "FolderPath" in the Excel-Sheet only, I can't use "Display" or "Labels" from the Layer Properties. ArcMap will ignore the expressions and uses the first column as "Name".
- If I use "FolderPath" and "Name" in the Excel-Sheet, ArcMap will correct use the points name in the kmz-structure but will also produce a label - even if "Label features in this layer" is not active! This label can't be deactivated?!?
- While using "FolderPath", why do I have to use more depth than I need/want? /1, /2, /3 don't work but /1/1, /1/2, /1/3 do. But the kmz then contains one level too much.

(The easiest way is a py-macro, maybe. But my knowledge is limited to py for Label Expressions... So, at the moment, the best way is to do it manually 😉 )

0 Kudos
2 Replies
DavidPike
MVP Frequent Contributor

I've read this several times and struggle to understand what you're asking.  

0 Kudos
OiledAmoeba
New Contributor

Sorry, English is not my native language. Parts from my posts are copy&paste from Google translator 😉

I try to say that ArcMap isn't work as I expext if I pre-define fields like "FolderPath" and "Name" in the underlying Excel-Workbook.

As far as I discovered, ArcMap use the first column from the Excel-Sheet as the points name. I can manipulate this name by using a column "Name" in the sheet. That is nice and is working.

But if I additionally try to use a column named "FolderPath" to set a folder structure for the KMZ, ArcMap will create this structure (as expected and as wanted) but will also produce labels that are always visible in Google Earth (or any KMZ-Viewer) (NOT as expected and NOT wanted).

This effect (labeling points) doesn't happen if I just use "FolderPath" without using "Name", but then I can't use any other names than what ArcMap finds in the first column of the table.

My goal is to have a KMZ with hundreds/thousands of points and to have these points ctegorized in the KMZ-Folderstructure. But none of these points should have a visible lable.

I would like to use "FolderPath" to avoid having to load each table from the workbook individually and add x/y data. For example, I would like to mark with "FolderPath" from which table the data came from.

Example: The file has the sheets "All addresses", "Blue", "Red", "Green".
So far I have to load Blue, Red and Green individually. Why not specify the FolderPath "/Blue", "/Red", "/Green" in "All addresses" and then load just one table in ArcMap?

Well, actually it would work like that, but then I have the problem with the naming of the points and the labeling.

The reason I want to do it through Excel is because there are hundreds of cities involved. It's far too time-consuming to set this up for each city's workbook individually in ArcMap...

I hope that this post is more clear than my first one...

0 Kudos