Reading xlsx file with chart sheets

Issue #137 resolved
Rob van Harrevelt
created an issue

I have problems reading data from an xlsx file containing chart sheets, i.e. sheets that contain nothing but a chart.

The xlsx file contains two sheets: the first sheet, named "Chart1", is a chart sheet and the second, "Sheet1", a sheet with data. I want to read the data on Sheet1.

The function workbook.get_sheet_names() returns a list of length 1 with text "Chart1". Apparently, the chart sheets are skipped when the xlsx file is read, but the names of the sheets returned by get_sheet_names include the names of the chart sheets.

The function get_sheet_by_name does not work correctly, too. For example, the result of the command

sheet = book.get_sheet_by_name(name = "Sheet1")

is that sheet is set to None.

Attached is an example xlsx file example.xlsx and a python script test.py.

Rob van Harrevelt

Comments (4)

  1. Log in to comment