[GIS] Modifying CSV file in QGIS before joining it to shapefile

csvqgis

I've imported a Delimited Text File that I want to join to a shapefile.

Unfortunately, the join field has a ' character before the actual string.

I wanted to delete that character, but I can't edit the file because I get:

This layer does not support adding new provider fields

Consequently, I cannot edit the file (and yes, I toggled the layer editing icon on and tried editing it after saving the imported CSV with a new name).

Is there a way to get around this?

Best Answer

Editing CSV files inside QGIS, AFAIK, is not possible.

Never the less, while importing the CSV with the add delimited text tool, you have a option to choose what characters to ignore.

If your data does not have any ' beside the ones on your problematic strings, you can simply add that characther to that option and it will never be imported in qgis in the first place.

If within your strings the ' character is used elsewhere like in I'm then you will need to use the regular expressions option.

On the other end, also while importing the CSV using add delimited text, you might want to use the watch file option. This way you can do changes in the CSV file (outside QGIS) and they will be updated as soon as you refresh the map canvas, or reopen the attribute table.

Related Question