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

Fixes issue where the contents of hidden sheet was returned when parsing visible sheets only. #536

Merged
merged 3 commits into from
Aug 18, 2020
Merged

Fixes issue where the contents of hidden sheet was returned when parsing visible sheets only. #536

merged 3 commits into from
Aug 18, 2020

Conversation

ResumeNothing
Copy link
Contributor

Summary

With only_visible_sheets option set to true, the contents of visible sheets were sometimes incorrect due to the index that was being provided to the Sheet constructor. This PR fixes that issue by keeping track of the indicies for the sheets that are kept and passing the appropriate index to the constructor.

Other Information

I've updated the hidden_sheet.xlsx file to contain simple, identifying contents for both the hidden and visible sheets. I've also added a test that failed before the code change, but there may be a better location for that test.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 94.345% when pulling ce4be34 on litify:bug-visible-sheet-contents into d416f15 on roo-rb:master.

Copy link
Member

@simonoff simonoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please simplify code and remove unneeded files.

lib/roo/excelx.rb Outdated Show resolved Hide resolved
@simonoff simonoff merged commit e9a23ba into roo-rb:master Aug 18, 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.

3 participants