-
Notifications
You must be signed in to change notification settings - Fork 503
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
Expand merged cells to fill the range #171
Conversation
@@ -121,10 +122,30 @@ def extract_hyperlinks(relationships) | |||
end | |||
|
|||
def extract_cells(relationships) | |||
Hash[doc.xpath("/worksheet/sheetData/row/c").map do |cell_xml| | |||
if @options[:expand_merged_cells] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extract this block into separate method?
Would be great to have some test case for this new feature. |
1 similar comment
1 similar comment
Added tests with the option set and unset, and refactored out into a separate method. |
1 similar comment
Hey. Will this be usable with roo? |
It's usable from my fork, it's just pending integration. Simonoff would need to comment on that. |
Thanks. Working great. :) |
Expand merged cells to fill the range
I think we should update the README file too and document the new :expand_merged_ranges option. Along the same lines, |
When reading a worksheet with merged cells the default behaviour is to have the value in the top left cell and the remaining cells be empty. Being able to expand the merged cells to duplicate the value into all cells in the range can be helpful.