[Qgis-user] Importing spreadsheet: Strange behaviour

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Sun Mar 13 00:59:08 PST 2022


Hi Micha,

thank you.

And where in this theoretical situation exactly do you use drag and drop
of spreadsheets to the canvas in this process?

Bernd


Am 13.03.22 um 09:56 schrieb Micha Silver:
>
> On 13/03/2022 10:37, Bernd Vogelgesang wrote:
>>
>> Hi Micha,
>>
>>
>> can you elobrate a bit more on these situations where the data has no
>> column header, cause I don't know them.
>>
>>
>
> Well, just a few theoretical examples:
>
> I might have several tables of data from some sensor (i.e. rainfall,
> temperature) with dates, long/lat and column headers. Merging all the
> tables would cause the column headers to get repeated for each table.
> I usually just remove *all* column headers, then import, and point to
> the correct columns for long/lat.
>
>
> When I extract values from a multiband raster at point locations (for
> some ML model) I get just columns of values; the actual column names
> are not important.
>
>
> Hope that clarifies.
>
>
>> Bernd
>>
>>
>> Am 13.03.22 um 09:35 schrieb Micha Silver:
>>>
>>>
>>> On 13/03/2022 10:22, Bernd Vogelgesang via Qgis-user wrote:
>>>>
>>>> Hi Andrea,
>>>>
>>>> thanx for clarifying.
>>>>
>>>> imho this is not a "wise" design decision. Maybe I am too less a
>>>> pro, but i can't think of any situation when someone seriously
>>>> working with table data does NOT want to have a column header. What
>>>> would be the advantage of that?
>>>>
>>>
>>> There are situations where the data table contains only data: no
>>> column headers.
>>>
>>>
>>>> Ok, if this is a GDAL-design decision, then at least QGIS should
>>>> have default settings in the environment preventing this.
>>>>
>>>> An ordinary user will never ever expect this behaviour nor find
>>>> this setting by himself.
>>>>
>>>> Cheers,
>>>>
>>>> Bernd
>>>>
>>>>
>>>> Am 13.03.22 um 08:55 schrieb Andrea Giudiceandrea:
>>>>>> *Bernd Vogelgesang*
>>>>>> /Sat Mar 12 14:13:04 PST 2022/
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> So: All-string tables will not be imported correctly. Always e.g.
>>>>>> add an
>>>>>> id-field with number
>>>>>
>>>>> Hi Bernd,
>>>>> this is by design:
>>>>> https://github.com/OSGeo/gdal/blob/1c5bc766513c4407f702bd8cd8bfa958ed61cfea/ogr/ogrsf_frmts/xlsx/ogrxlsxdatasource.cpp#L597-L598
>>>>>
>>>>> Am 12.03.22 um 23:04 schrieb Jonas Küpper://
>>>>>> >/what should have fixed it as well would be to pass
>>>>>> OGR_XLSX_HEADERS = />/FORCE to the provider while loading
>>>>>> xlsx-files but a i couldn't find a />/way how to do that. (see
>>>>>> https://gdal.org/drivers/vector/xlsx.html) /
>>>>>
>>>>> Hi Jonas,
>>>>> you can set a GDAL/OGR configuration option, like
>>>>> OGR_XLSX_HEADERS, via the "Settings" -> "Options" -> "System" ->
>>>>> "Environment" setting panel in QGIS.
>>>>>
>>>>> Regards.
>>>>>
>>>>> Andrea Giudiceandrea
>>>>
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user
>>> --
>>> Micha Silver
>>> Ben Gurion Univ.
>>> Sde Boker, Remote Sensing Lab
>>> cell: +972-523-665918
>


More information about the Qgis-user mailing list