Skip to content

Conversation

@randsu
Copy link

@randsu randsu commented Jan 14, 2021

If exists in zip, then use constant for filename, don't postfix filename with sheet number in this case.

I encountered this problem in some recent Excel .xlsx files, and fixed it in my clone.
This is probably a naive implementation, and I suspect this problem has something to do with the "standalone" xml attribute.

@randsu
Copy link
Author

randsu commented Jan 19, 2021

This is an interesting post, stating that you should look up the relationsships for workbook => sheets in _xl\rels\workbook.xml.rels and not rely on a fixed protocol for numbering.

tidyverse/readxl#104 (comment)

However, I still cannot reproduce having sheet.xml, after I save its back to sheet1.xml. Could be a flaw or non-standard way of creating Excel files from this 3rd party application.

@ahmedwalid05
Copy link
Owner

The issue you linked seems to be correct.
Currently, there are two issues that would be fixed by this,

  • If the sheet doesn't have a number, you won't be able to access it.
  • If you change the order of the sheets, it won't be reflected. So you would still get the first sheet sheet1with the name of sheet2.

If you want to work on this, I will merge it.

@randsu
Copy link
Author

randsu commented Jan 19, 2021

I hope I can get time to look at it, and contribute to this nice repo, which is easy to use, standalone and effective.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants