Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Classes/PHPExcel/Writer/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,9 @@ private function _createCSSStyleBorders(PHPExcel_Style_Borders $pStyle) {
* @return string
*/
private function _createCSSStyleBorder(PHPExcel_Style_Border $pStyle) {
// Create CSS
$css = $this->_mapBorderStyle($pStyle->getBorderStyle()) . ' #' . $pStyle->getColor()->getRGB();
// Create CSS - add !important to non-none border styles for merged cells
$borderStyle = $this->_mapBorderStyle($pStyle->getBorderStyle());
$css = $borderStyle . ' #' . $pStyle->getColor()->getRGB() . ($borderStyle=='none'?'':' !important');

// Return
return $css;
Expand Down Expand Up @@ -1229,6 +1230,9 @@ private function _generateRow(PHPExcel_Worksheet $pSheet, $pValues = null, $pRow
$spans = $this->_isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum];
$rowSpan = $spans['rowspan'];
$colSpan = $spans['colspan'];
//Also apply style from last cell in merge to fix borders - relies on !important for non-none border declarations in _createCSSStyleBorder
$endCellCoord = PHPExcel_Cell::stringFromColumnIndex($colNum + $colSpan - 1) . ($pRow + $rowSpan);
$cssClass .= ' style' . $pSheet->getCell($endCellCoord)->getXfIndex();
}

// Write
Expand Down