1

I'm trying to join an excel spreadsheet with one of my layers. I've formatted the spreadsheet to fit QGIS, with basicaly one string and a few integers. I've saved my spreadsheet in a .csv fromat, and created a text folder saved in .csvt format, with the following code: "String","Integer","Integer","Integer";"Integer","Integer".

I've imported the spreadsheet into QGIS, however, once joined, all my integer become strings, as shown in the image below. Any reason why this happens?enter image description here

  • 2
    Maybe try the different answers to this question – Gabriel C. Dec 20 '18 at 15:42
  • 1
    Is they CSV file with the same name as they csvt file? – Gerardo Jimenez Dec 21 '18 at 4:44
  • @GerardoJimenez yes they both have the same name and are located in the same folder – Guillaume Dec 21 '18 at 9:29
  • Hi one little question. Can you see file extensions in windows explorer? Sometimes people have this option non activated and since the csvt file coul be created in notepad it does have a txt extension by default. Changing the file extension without being able to see file extensions can lead to some troubles. The file could be saved as myfile (you can not see the file extension). When you change the file extension you "see" myfile.csvt, but in reality is myfile.csvt.txt. For this reason I have activated the option to see file extensions in windows explorer – Gerardo Jimenez Feb 11 at 15:27
2

You don't have to convert your excel file to csv. Use the plugin "Spreadsheet Layers" to import xls file to QGIS (plugins -> manage and install plugins) With this plugin, you can choose the type each field.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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