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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jan 1, 2013 at 19:15
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.

answered Jan 1, 2013 at 20:45
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.