New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading sheet if position is after a chart #116

edwardlennonjr opened this Issue Jul 14, 2015 · 1 comment


None yet
2 participants

edwardlennonjr commented Jul 14, 2015

read_excel fails to read a given "sheet" worksheet if its position in the workbook is after a "chart" worksheet.

Here is a link to the example file;

The example excel file (.xlsx) contains 3 worksheets;

  1. Sheet1
  2. Chart1
  3. Sheet2 - exact copy of Sheet1
    Sheet1 imports great but Sheet2 gives the error below. I have tested on a few different Excel files and the sheet position appears to be the issue.

e.g. output
read_excel(path = example_excel_file, sheet = "Sheet1")
a b c
1 1 10 hello
2 2 20 there
3 3 30 world

read_excel(path = example_excel_file, sheet = "Sheet2")
Error: Couldn't find 'xl/worksheets/sheet3.xml' in

Issue location:
It looks like this issue can be traced to the standardise_sheet() function in the read_xlsx() function.

  1. when sheet = "Sheet1" (read_excel()), standardise_sheet() computes 0 and imports fine.

  2. when sheet = "Sheet2", standardise_sheet() computes 2 and the import fails. If I manually change the result of standardise_sheet() to 1 then the import works.

standardise_sheet() needs to remove the chart objects from "sheet_names" before evaluating the match() function.

Thank you!


This comment has been minimized.


jennybc commented Jan 19, 2017

Same problem as #104

Downloading directly from link above doesn't produce a workbook with an embedded chart sheet. But opening in Google Sheets and then downloading does.

@jennybc jennybc closed this Jan 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment