合并exel、exel 字体颜色、exel 背景颜色

cuishilei / 2024-10-11 / 原文

//合并exel
$newobj->mergeCells('A1:A3');

//exel 字体颜色
$newobj->getStyle('A1:A2')->getFont()->getColor()->setARGB('ff0000');

//exel 背景颜色
$newobj->getStyle('A1:A2')->getFill()->setFillType(\PHPExcel_Style_Fill::FILL_SOLID);
$newobj->getStyle('A1:A2')->getFill()->getStartColor()->setARGB('ff0000');