Bug report #13187

Numeric FIELD names are lost on CSV import

Added by Zoltan Szecsei over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:2.10.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21249

Description

Hi,
QGIS 2.10.1 on Win7 64 bits refers.
I read a CSV file (as attributes only) stipulating that "first record has field names"
Record 1 is as follows:
"SALnum","SALnam","1","2","3","4","5","6","7","8","9","10+"

When I open the attribute table, I see that fields 1 & 2 have names SALnum and SALnam, but the rest are called 'Field_3', 'Field_4' and so on.

When I edit record 1 of this CSV file to look like:
"SALnum","SALnam","1p","2p","3p","4p","5p","6p","7p","8p","9p","10+p"

Now I get the correct field names (albeit 1p instead of just "1")

Whilst this is a silent error, it can cause the user problems when JOINING data, or doing anything else that requires knowledge of attribute field names (like exporting data to a client expecting numeric field names).

Regards,
Zoltan

Associated revisions

Revision 379652d2
Added by Andrea Giudiceandrea over 5 years ago

delimited text: let field names be numerical value

fixes #19638 "CSV: numeric header gets a trailing underscore + 1"
fixes #13187 "Numeric FIELD names are lost on CSV import"

Revision a5fd8137
Added by Andrea Giudiceandrea over 5 years ago

delimited text: let field names be numerical value

fixes #19638 "CSV: numeric header gets a trailing underscore + 1"
fixes #13187 "Numeric FIELD names are lost on CSV import"

(cherry picked from commit 379652d2022c5373d679d0d0edddfa53f27b9453)

History

#1 Updated by Chris Crook over 8 years ago

Fixed in pull request 2237

#2 Updated by Chris Crook over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF