0

I use the next line to color a cell red.:

$spreadsheet->getActiveSheet()->getStyle('O'.$i)->getFill()->setFillType(\PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID);
$spreadsheet->getActiveSheet()->getStyle('O'.$i)->getFill()->getStartColor()->setARGB('FF2911');

But i don't get it fixed to color the text red and not the cell. I tryed using what they saying here link , but for some reasen i don't get it to work.

I also tryed this, but nothing changes.:

$spreadsheet->getActiveSheet()->getStyle('O'.$i)->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_RED); 

Can somebody help me please.

Pascal
  • 427
  • 2
  • 6
  • 13

0 Answers0