Opened 7 years ago

Closed 7 years ago

Last modified 6 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 7 years ago.
csvtest.csv (162 bytes) - added by Jukka Rahkonen 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by blokeshkumar

Attachment: ticketTest.xlsx added

comment:1 Changed 7 years ago by blokeshkumar

Priority: normalhighest

comment:2 Changed 7 years ago by blokeshkumar

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

comment:3 in reply to:  2 Changed 7 years ago by Even Rouault

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

Changed 7 years ago by Jukka Rahkonen

Attachment: csvtest.csv added

comment:4 Changed 7 years ago by Jukka Rahkonen

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 Changed 7 years ago by blokeshkumar

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

comment:6 Changed 7 years ago by Even Rouault

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

comment:7 Changed 7 years ago by Even Rouault

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 Changed 6 years ago by Even Rouault

See #6363 for similar issue on read-side

Note: See TracTickets for help on using tickets.