roo-rb / roo

Roo provides an interface to spreadsheets of several sorts.
MIT License
2.78k stars 503 forks source link

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

Closed ResumeNothing closed 4 years ago

ResumeNothing commented 4 years ago

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 commented 4 years ago

Coverage Status

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