1

This question already has an answer here:

I joined some data from excel to arcmap, but the added fieldnames from the excel table (land, Germany, field3, field4, ...) aren't the fieldnames which I want to use. For example land=district and Germany has to be 2006. When I only change the alias name, the name removes when I turn my PC off... Is there a way to change them permanently.

I found out that the data was visable at the attribute table, but it was not at the fields in the shapefile properties. By exporting the joined shapefile to a new shapefile this problem is fixed, but the fieldname(s) are still not editable.

I saw you can edit the names at the shapefile properties, but when I change them it gives a "Alter field name Failed" error.

Does somebody know a solution?

marked as duplicate by Andre Silva, HDunn, Mapperz Nov 30 '16 at 18:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Sort of duplicate, it would be duplicate if I didn't import my own data analysis. This is why the alterfield option doesn't work. The other "beginner" way to create a new field will cost lots of time, so i do it with the geodatabase way. – Watermanagement Nov 30 '16 at 14:55
  • 1
    If you had exported to the (superior) format of a geodatabase then you would be able to change the field names... Shapefiles are an old format that do not support advance functionality. I recommend you spend some time getting to grips with a file geodatabase as they store more, more compact, run faster and support higher functionality. Shapefiles seem to have become more popular with the rise of open source and web mapping but as you have discovered you are shooting yourself in the foot using them... – Hornbydd Nov 30 '16 at 17:10
2

You can't modify field names for a shapefile (this is possible for gdb feature classes though). Use Feature Class to Feature Class to create a copy of the shapefile (the field_mapping parameters allows you to give other field names in the output).

  • Thanks! Your solution in combination with my own thoughts and tries brought me pretty far – Watermanagement Nov 30 '16 at 13:55
1

Here are two more options:

  1. Rename the field/column names in excel before you join to what you want them to be (you'll still have to follow some basic dBase field name rules like no spaces, special characters, and <= 10 characters).
  2. If you cannot do step one, then once you have your exported new joined shapefile, create empty fields that have the names you want and use either Field Calculator or Calculate Fields geoprocssing tool to move the values over from old field to preferred field. Once all fields have been created and populated you may then delete the old fields.
  • I had data from different floods in Europe, so I made a Pivottable. Excel take the first row as fieldnames, that is why it took Land, Germany, etc... I already tried the option from GISGe, but is it possible to do this with the imported (not joined) tables? So I change the fieldnames at the nonjoined table once and join&relate it when the names are correct. Then I maybe do not have to change them at every shapefile? – Watermanagement Nov 30 '16 at 13:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.