Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#6680 closed defect (fixed)

XLSX Driver stops reading layers after first Chart

Reported by: Mike Toews Owned by: warmerdam
Priority: normal Milestone: 2.1.2
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by Mike Toews)

While using the XLSX Driver from OGR on a Excel Workbook with multiple tabs, the driver reads each Worksheet as a Layer, in the order they appear. However, if one of the tabs is a Chart, OGR describes the tab as a Layer (which is should not), and stops reading the remaining tabs of the workbook.

I've prepared a Workbook in Excel 2016 with the following tabs:

  • Sheet1
  • Chart1
  • Sheet2

With the following behaviour from an OSGeo4W Shell:

C:\Temp\OGR>ogrinfo --version
GDAL 2.1.1, released 2016/07/07

C:\Temp\OGR>ogrinfo including_chart.xlsx
INFO: Open of `including_chart.xlsx'
      using driver `XLSX' successful.
1: Sheet1 (None)
2: Chart1 (None)

note that I cannot access Sheet2 without modifying the document to re-order the tabs so that it is before "Chart1". And if I blank the data from "Sheet2", "Chart1" no longer is listed (and I'm not sure why -- I can add this as a separate .xlsx file if needed).

An expected behaviour would only read the spreadsheet tabs, skipping any Charts:

1: Sheet1 (None)
2: Sheet2 (None)

Attachments (1)

including_chart.xlsx (14.0 KB) - added by Mike Toews 4 months ago.

Download all attachments as: .zip

Change History (5)

Changed 4 months ago by Mike Toews

Attachment: including_chart.xlsx added

comment:1 Changed 4 months ago by Mike Toews

Description: modified (diff)

comment:2 Changed 4 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 35709:

XLSX: only list worksheets (and no charts) as layers (fixes #6680)

comment:3 Changed 4 months ago by Even Rouault

In 35710:

XLSX: only list worksheets (and no charts) as layers (fixes #6680)

comment:4 Changed 4 months ago by Even Rouault

Milestone: 2.1.2
Note: See TracTickets for help on using tickets.