2

I am trying to join a .csv file to a layer in QGIS 2.18.6. For that I created a .csvt file. However, I am not able to join the two files. I tried it with the key both as integer and string but in both cases it didn't work. When the key is an integer I have the additional problem, that the leading zero disappears in the key column which makes it obviously impossible to link it to the shapefile.

The .csvt file looks as follows:

"String","Integer","Integer"

or

"Integer","Integer","Integer"

The .csv file contains in the first column the key and in the rest data. The .shp file only contains a key column in the attribute table.

closed as off-topic by underdark May 20 '17 at 13:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – underdark
If this question can be reworded to fit the rules in the help center, please edit the question.

3

Worked fine for me using either:

"String","Integer","Integer"

Or no csvt at all:

enter image description here

enter image description here

  • 1
    I need the csvt file for a classification afterwards. However, it is working for me as well now. I don't know exactly where my error was. Thanks for your help! – Hannah H. Apr 13 '17 at 12:02
  • @Hannah, the best way to say thanks is accepting the answer (as it seems that this solution solved the issue). – mgri Apr 13 '17 at 12:17
1

since it worked for me as well, maybe the problem is not within qgis, but your workflow? did you do the following:

  1. load both files in qgis
  2. open properties of Prognoseraum.shp
  3. go to tab Joins and click the green plus symbol
  4. select the join field
  5. press OK press Apply press OK?
  • I tried a reboot (classic) and afterwards it was working for me as well. Maybe some problems with the updates. Thanks for your help – Hannah H. Apr 13 '17 at 12:00

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