3

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.

3 Answers 3

4

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/

0
0

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.

-1

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

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.