Skip to content
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

WIP: use workbook.xml.rels as source of truth for sheets #96

Closed
wants to merge 1 commit into from

Conversation

xavier
Copy link

@xavier xavier commented Nov 7, 2019

This is a quick and dirty solution to the issue of worksheet names not being reliably assigned to the sheet struct, as reported in #93.

It contains the following changes:

  • No more wishful coupling between sheet XML filenames and the workbook sheet r:id and their index
  • Loading of sheets is now entirely driven by the contents of xl/rels/workbook.xml.rels (other relationships are ignored)
  • The index of the sheets is based on their order of appearance in workbook.xml
  • We keep track of the index alongside with the sheet name in the workbook ETS table

It most definitely cannot be merged in its current state:

  • I haven't updated the documentation
  • I have broken public APIs
  • I haven't added tests specific to these changes
  • It focuses on the happy path and I've cut corners regarding error handling
  • The over-reliance on ETS tables which is unfortunately encouraged by the current lib architecture is not great IMHO

If you find some of the code valuable, I'd be happy to keep working on this based on your feedback.

@xavier xavier closed this Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant