I have an attribute table with two empty fields in QGIS.
I want to import an excel database to fill my empty fields in QGIS. My excel file matches the columns in my QGIS attribute table.
I am able to properly join my excel (.CSV) to my shapefile. However,the process, instead of filling the blank fields as I wish, created duplicates. With the help of « Table Manager » I am able to correct the situation, but it requires a lot of time. I am looking for a more efficient way to join my excel data.
How can I join my excel file to my attribute table without creating duplicates?
Answer
I would do the following things to make life easier:
Before you do this, make a backup of your shapefile.
- In your shapefile, go to the layer properties / fields and turn on edit mode.
- select all Field except the ID field
- Delete all fields except the ID Field
- add your csv file as a layer in QGIS (Main menu/Layer/Add Layer/ Add delimited text layer) (choose no geometry)
- in your shapefile, select properties/joins and choose both ID fields for source and target. As described in the other answer to this question.
- Save your modified Shapefile.
this is the Field tab I am referring to
Don't forget to toggle editing before and after deleting unnecessary field
No comments:
Post a Comment