Support workbooks which have a non-standard name for workbook.xml

#161 Merged at dcce014
Repository
batterseapower
Branch
default
Repository
openpyxl
Branch
2.4
Author
  1. Max Bolingbroke
Reviewers
Description

I'm not sure files like this can be generated by Excel itself, but other systems that output xlsx seem to use them sometimes

Comments (10)

  1. Charlie Clark

    Thanks very much but please edit the PR to be based on the 2.4 branch.

    It shouldn't be too hard to switch from the current hard-coding of "workbook.xml" to something extracted from the rels but this should probably done in a separate function or method to simplify testing.

  2. Reuben Mees

    I suspect the code added in this pull request is creating an OSError for users trying to use the openpyxl module to open some .xlsx spreadsheets that are not native to Excel. Several users, myself included, have reported the problem in this thread (https://bitbucket.org/openpyxl/openpyxl/issues/789/unexpected-error-when-loading-a-file) The problem was first reported in March 2017, shortly after the 2.4.5 release and continuing through the 2.4.7 release. I know with certainty the issue does not exist in an earlier version of the module.

    If this issue is not going to be resolved, is there a repository that has version 2.4.4 available for download? I realize this is a "hack" solution, but a series of programs I have written for my job have been rendered unusable by this issue.

    1. Charlie Clark

      You should be able to pin against 2.4.4 otherwise you can always hg up 2.4.4 as all releases are tagged.

      I don't know why no one has submitted a PR to resolve the problems you're seeing, it should be easy enough.

      1. Reuben Mees

        I'm not really sure what a PR means -- in my line of work, it refers to public relations -- let alone how to go about submitting one. I'm a greenhorn when it comes to Python and programming as a whole -- and what I do know is self-taught -- so much of the lingo is lost on me. I apologize for my ignorance, but that's where I'm at.