Opened 4 years ago

Closed 4 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:


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 (1.7 KB) - added by alculquicondor 4 years ago.
Sample shp

Download all attachments as: .zip

Change History (4)

comment:1 Changed 4 years ago by Even Rouault

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

Changed 4 years ago by alculquicondor

Attachment: New added

Sample shp

comment:2 Changed 4 years ago by alculquicondor

The problem seems to be option preserve_fid.

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

comment:3 Changed 4 years ago by Even Rouault

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.