PHPOffice/PHPExcel — pull request #154 by alexgann (2013-03-20 19:34:04+00:00)
Title: Fix merged-cell borders

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.