Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#5774 closed defect (fixed)

When exporting to MS Excel file using XLSX driver, if the data contains more than 26 columns, users will see a few columns gap between columns 26 and 27.

Reported by: blokeshkumar Owned by: warmerdam
Priority: normal Milestone: 1.11.2
Component: OGR_SF Version: 1.11.1
Severity: normal Keywords: xlsx
Cc:

Description

While Using XLSX driver there is a gap between 26th column and rest of the columns. For example After column z, Columns AA to Columns AZ are empty only BA has the next column. I use Postgres data source.

Sample:

ogr2ogr -f "XLSX" Drive://ticketTest.xlsx PG:"host=localhost user=xxx dbname=xxx password=xxx" -sql "select * from f_wsystemvalve"

I even tried converting from csv to XLSX using XLSX driver.Issue is reproducible. Can you please help me in this regard. Is there any option to make this work properly or any work around ?. Kindly help me in this regard.

Attachments (2)

ticketTest.xlsx (4.1 KB ) - added by blokeshkumar 9 years ago.
csvtest.csv (162 bytes ) - added by Jukka Rahkonen 9 years ago.

Download all attachments as: .zip

Change History (10)

by blokeshkumar, 9 years ago

Attachment: ticketTest.xlsx added

comment:1 by blokeshkumar, 9 years ago

Priority: normalhighest

comment:2 by blokeshkumar, 9 years ago

Can this be addressed quickly ? This is a high priority issue for us.

in reply to:  2 comment:3 by Even Rouault, 9 years ago

Replying to blokeshkumar:

Can this be addressed quickly ? This is a high priority issue for us.

If you wish I can be contracted to work on a fix. See http://spatialys.com

by Jukka Rahkonen, 9 years ago

Attachment: csvtest.csv added

comment:4 by Jukka Rahkonen, 9 years ago

I have confirmed the bug with attached file "csvtest.csv" and command

ogr2ogr -f xlsx csvtest.xlsx csvtest.csv

Driver creates fields A-Z, then skips fields AA-AZ and starts writing new columns from BA. It is possible that in this case the reason is in a dependent FreeXL library https://www.gaia-gis.it/fossil/freexl/index.

Open source developers who work with GDAL just for fun pick up bugs every now and then if they have a proper feeling for that. There are also developers who can be contracted and with some money you can make them run faster.

comment:5 by blokeshkumar, 9 years ago

xlsx driver does not use Free XL Library. Only XLS driver uses it, I suppose.

comment:6 by Even Rouault, 9 years ago

Yes, the issue is self-contained in the XLSX driver. No connection with FreeXL

comment:7 by Even Rouault, 9 years ago

Component: defaultOGR_SF
Keywords: xlsx added
Milestone: 1.11.2
Priority: highestnormal
Resolution: fixed
Severity: criticalnormal
Status: newclosed

Oh well... trunk r28180, branches/1.11 r28181 "XLSX: fix column numbering when there are more than 26 columns (#5774)"

comment:8 by Even Rouault, 8 years ago

See #6363 for similar issue on read-side

Note: See TracTickets for help on using tickets.