9

I have problems importing a .csv file.

Some Values of the file are not supposed to be formated in text style, but in number style, thus i created an additional .csvt file like explained here.

Both files with exactly the same name and the same location are created. The number of columns is the same and I add the .csv file with the "Add Delimited Text Layer" tool. Nevertheless I am not able to choose any columns for a graduated symbology.

My .csv file includes 12 rows, of which the 5th, 11th, and 12th column consist numbers. My .csvt file therefore looks like that:

"String","String","String","String","Integer","String","String","String","String","String","Integer","Integer"

I tried to create it with the standard editor from Windows and Notepad++.

What mistake may I have made?

0

1 Answer 1

11

The "Add delimited text layer" tool does not interpret the CSVT. Only "add vector layer" needs a CSVT. Basically, "add delimited text layer" tries to make a best guess and it usually does very well recognizing numeric values. One of the reasons to use "add vector layer" is that "add delimited text layer" requires a geometry column.

Does your CSV contain a geometry or x and y columns? Then use "add delimited text layer".

If your CSV does not contain any coordinates/geometry, use "add vector layer".

As to why the numeric values are not recognized by "add delimited text layer", please post your CSV or at least a sample (first few lines). If even one line in the file contains a text in the "numeric" column, the tools will default back to String.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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