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

Merged cell borders #271

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mdotterer
Copy link
Contributor

These changes make it so that changing the border of a merged cell applies to the entire merged area. For example, setting border right on a cell merged horizontally over multiple columns will set the border on the cell as expected. The same goes for border colors.

if merged_cell
merged_cell.ref.row_range.each do |r|
merged_cell.ref.col_range.each do |c|
worksheet.add_cell(r, c, '', nil, false).change_border(direction, weight, :direct_match)
Copy link
Owner

Choose a reason for hiding this comment

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

The problem here is that if merged cell is, like, 3 cells wide and 3 cells high, then the central cell (which technically does not have any visible borders) will get a border as well...

Also, what will happen if a cell already exists at those coordinates?

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.

None yet

2 participants