Answer the question
In order to leave comments, you need to log in
Why is cell color not being set in PHP Spreadsheet?
Trying out the code
$worksheet->getCell('B1')->getStyle()->getFill()->getStartColor()->setARGB('FFF5F2DD');
Answer the question
In order to leave comments, you need to log in
You need to add the SetFillType method
$sheet->getStyle('B1')
->getFill()
->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID)
->getStartColor()
->setARGB('FFF50000');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question