Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In QGIS, I am trying to add some non-spatial data (in .xls file) that I want to use to join to some spatial data.

Adding the file, either from 'add vector' or dragging file onto project I get the above error.

Running QGIS v.1.7.4 on Windows.

Reading the documentation, this is supposed to work as of v1.7.

Wondering what I am doing wrong.

Also, tried to do a simliar thing with an MSSQL to a non-spatial sql table with the same error.

Cheers!

share|improve this question

3 Answers 3

QGIS can only read XLS if you have GDAL/OGR >= 1.9.0 built against the FreeXL library http://www.gdal.org/ogr/drv_xls.html

It will be easier to export to CSV and load using "add delimited text layer" if the data contains coordinates or "add vector layer" if the data contains no spatial information (and yes, that isn't very intuitive).

If you load CSV data using "add vector layer", you might also want to create a CSVT file. The CSVT contains the column data type definitions. If OGR cannot find such a file, all columns will be interpreted as text. Instructions: http://underdark.wordpress.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/

share|improve this answer
    
Converting to a CSV still wont allow an import. This is non-spatial attribute data without any X or Y info. The 'OK' button stays greyed out on the 'create a layer from delimited text file'. –  Bret May 31 '12 at 22:17
    
right, i updated the answer –  underdark Jun 1 '12 at 6:39

Try adding the csv layer as "New vector layer", not "delimited text layer". The latter is only intended for spatial data. That even works on the 1.7.4 standalone Windows installer Version. XLS Import fails, due to the wrong GDAL version.

HTH,

Andre Joost

share|improve this answer

For non-spatial data, you need Table Join. Here's a step-by-step guide

http://qgis.spatialthoughts.com/2012/03/using-tabular-data-in-qgis.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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