In QGIS, I have a shapefile containing about 200 polygons. The attribute table contains some variables. I created a excel file from the attribute table and edited some of the variables. Now I want to return the new values of the excel table to the attribute table of the shapefile. Perhaps I could use the unchanged variable "height" in order to identify each single polygon (I forgot to introduce IDs; however, there are no dublicates in "height"). Is there a practical way to update the attribute table?

1 Answer 1

  1. The first thing you need to do is to identify a unique attribute that matches the two tables. You seem to already have done that and identified "height" as a link between the two tables.

  2. The next thing is to load both datasets as layers in QGIS.

  3. Now on the target layer (the shapefile) go the the layer properties and add a join. Use the matching unique field from both tables to join them.

  4. Now you should see the attributes from the excel layer in the attribute table of the shapefile.

  5. Use the field calculator to copy attributes to the shapefile or do other amazing things.

  • thank you, that worked! I did not understand the "join"-section in the first place. However, it didn't work with a csv-file; I used the xlsx file et voilà.
    – yenats
    Mar 9, 2017 at 16:55
  • It should work just the same with a csv file, maybe there is an extra space or some other invisible character included at the beginning or end of the attribute. Glad it worked though! Mar 9, 2017 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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