Read background color of cells from HTML file
If a <td> in HTML has a bgcolor attribute, it is then applied to the spreadsheet file
This commit is contained in:
parent
ab7aa68300
commit
720fb3eff5
|
@ -466,6 +466,15 @@ class HTML extends BaseReader implements IReader
|
|||
}
|
||||
$sheet->mergeCells($column . $row . ':' . $columnTo . $row);
|
||||
$column = $columnTo;
|
||||
} elseif (isset($attributeArray['bgcolor'])) {
|
||||
$sheet->getStyle($column . $row)->applyFromArray(
|
||||
[
|
||||
'fill' => [
|
||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||
'color' => ['rgb' => $attributeArray['bgcolor']],
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
++$column;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue