Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Fix merged-cell borders on HTML/PDF output #154

Closed
wants to merge 2 commits into from

Conversation

alexgann
Copy link
Contributor

HTML Writer will colspan/rowspan merged cells from the base cell but only apply the base cell's formatting. As a result, borders that are applied to right/bottom edges of merged blocks are being ignored.

Not the most elegant approach but is functional and performant. Essentially force all non-none borders to be !important css attributes, then apply both base Cell and last Cell styleXf Classes to the base cell. The !importants will override the base cell none borders for right and bottom.

Alternative approach I guess would be to check for merged cells during class generation and use getBottom() and getRight() calls against the last cell rather than the base cell. I had attempted this a few months ago but dropped it due to poor performance.

@alexgann
Copy link
Contributor Author

cleaned up code in second commit to remove unnecessary conditions

MarkBaker pushed a commit that referenced this pull request Apr 1, 2013
@MarkBaker
Copy link
Member

Merged manually. Thanks for a very useful bugfix. This really improves the HTML and PDF output, and has been on the "to do" list for a long while now. It's good to finally get a solution, and a simple, efficient one at that

@MarkBaker MarkBaker closed this Apr 1, 2013
@Progi1984 Progi1984 added this to the 1.8.0 milestone Aug 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants