Feature request #5606
Defining column types for CSV imports
|Category:||Data Provider/Delimited Text|
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||15179|
At work we use Mac OS X. Microsoft Office for Mac no longer supports DBF exports, and much of our data that we'd like mapped lives in Excel-compatible files.
I'm currently exporting as CSV using this workaround, but it requires me to create a CSVT file, an annoying extra step. http://underdark.wordpress.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/
Is there any way to eliminate this extra step by allowing a user to define the column types at import?
#5 Updated by Karolina Alexiou almost 5 years ago
The workflow would be to allow the user to force a data type for 1 or more columns. Basically I am thinking of adding another row to the UI when importing delimited text layer where the user would be able to select Int/Long/Float/Double/String or Autodetect(default). Right now there is autodetection, but it doesn't always work right. I could also see if there is some obvious improvement to be done in that.
#10 Updated by Médéric RIBREUX about 4 years ago
- Category set to Data Provider/Delimited Text
Hello, bug triage...
the PR has been merged.
One good idea (on the GUI part) would be to try to make the delimited text provider act like LibreOffice Calc csv importer:
- there is a QComboBox with the list of each type.
- When you select a column, you can use the QComboBox to define the type of the selected column.
We just need a way to display the manually defined type of columns (upper or above the column name), but I am sure it's feasible.