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
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.
The next thing is to load both datasets as layers in QGIS.
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.
Now you should see the attributes from the excel layer in the attribute table of the shapefile.
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à.– yenatsMar 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