[gdal-dev] Problem writing with ODS and XLSX drivers

Hernán De Angelis dhdeangelis at comhem.se
Sat Sep 12 10:21:49 PDT 2020


That was a very good piece of advice. Unfortunately that is apparently 
not the problem. The CSV imports cleanly in Libreoffice, with the same 
number of rows (minus title row) as features are in the shp. No trace of 
misplaced linefeed or carriage return characters. I will have to keep 
looking for solutions. Thanks anyway!

/H.

On 2020-09-12 18:56, Stephen Woodbridge wrote:
> Try exporting to CSV and check the that the records do not have any 
> embeded <CR> or <LF> chars. One simple way to do this is to compare 
> the record count of the shp file to the line count of the CSV file. 
> Try importing the CSV file into EXCEL  or Libreoffice and see if it 
> reports a problem. This may give you a better idea of what the problem 
> is.
>
> -Steve W
>
> On 9/12/2020 11:20 AM, Hernán De Angelis wrote:
>> Hi everyone
>>
>> I am experiencing an odd and stubborn problem when trying to export 
>> attribute tables from both shp and spatialite to ods or xlsx. ogr2ogr 
>> finishes work silently with no reported errors but the generated 
>> output files cannot be opened with Libreoffice, which says the file 
>> is corrupted and is even unable to repair it.
>>
>> The input files are good from what I can see using QGIS and OGR but 
>> it is clear that something isn't right in my installation, my 
>> procedure or somewhere else. I am missing something? Have other users 
>> experienced this?
>>
>> I am using GDAL/OGR 3.1.2 in openSUSE Tumbleweed, compiled against 
>> expat 2.2.9-1.12 (devel packages installed too, of course).
>>
>> Any hint is appreciated!
>>
>> Hernán
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list