I have a shapefile with Mediterranean countries, and an attribute table such as the one below: enter image description here

In an excel spreadsheet, I have population data for all of these countries, which I'd like to assign.

enter image description here

Is there a way I can export my excel data so that population of Italy is assigned directly to Italy in the attribute table for example?

2 Answers 2


You'd need a field in both the layer and the attribute table which contains the same values, e.g. the shortcuts for the countries. Then go to layer - add layer - add virtual layer and give the fields with the country-codes as unique ID.


I don't have right to comments, so I will ask here and edit/delete accordingly.

Do you have a dictionary which links Country in excel (which are in short codes) to country_name in attribute table (which are full name)?

  • Unfortunatelly no I don't...
    – Tim56
    Nov 9, 2018 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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