[GIS] Editing CSV tables in QGIS

csvqgis

I am trying to join a CSV table to a shapefile in QGIS 2.12.0. I have exported a table from Excel to CSV format, but when opening the table I noticed that my unique ID field in Excel is in text format, is changed to number in QGIS. Since my shapefile has that same ID field as a text string I cannot join them. I have tried to change the format to string but it does not let me. Does anyone know how to do this?

Best Answer

You can use the Field Calculator (open the Attribute Table, then Ctrl + I) to convert numbers to strings. The following command should do the job :

 tostring( "ID" )

(replace ID with the actual name of your ID field).

Related Question