Opened 7 years ago

Closed 7 years ago

#6994 closed defect (fixed)

XLSX write overrides the first row with column names

Reported by: alculquicondor Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 2.2.1
Severity: normal Keywords:
Cc:

Description

This was tested with ogr2ogr. The data of the first row is lost because it is overwritten with the column names.

Both versions 2.2.1 and 2.1.4 present the issue.

Attachments (1)

New Dataset.shp.zip (1.7 KB ) - added by alculquicondor 7 years ago.
Sample shp

Download all attachments as: .zip

Change History (4)

comment:1 by Even Rouault, 7 years ago

Please paste the ogr2ogr command line you're using and attach a input file, as minimal as possible to reproduce

by alculquicondor, 7 years ago

Attachment: New Dataset.shp.zip added

Sample shp

comment:2 by alculquicondor, 7 years ago

The problem seems to be option preserve_fid.

ogr2ogr -f XLSX test.xlsx New\ Dataset.shp -preserve_fid

comment:3 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

In 39774:

XLSX: avoid 'ogr2ogr -f XLSX out.xlsx in.shp -preserve_fid' to overwrite the first record. Note however that FID preservation itself doesn't really work with XLSX (fixes #6994)

Note: See TracTickets for help on using tickets.