Can I select multiple cells or a set of ranges to style them?
I know I can access a range of cells to format them :
$objPHPExcel->getActiveSheet()->getStyle('B3:B7')->getFill()
->setFillType(PHPExcel_Style_Fill::FILL_SOLID)
->getStartColor()->setARGB('FFFF0000');
Now is there a way, and if so, how can I define multiple cells or a set of ranges in the call getStyle()
? I tried
$objPHPExcel->getActiveSheet()->getStyle('B3:B7;C6:C12')->getFill()->...
and
$objPHPExcel->getActiveSheet()->getStyle('B3;C9;D2;E6')->getFill()->...
but both of them didn't work and gave an error.
+3
source to share
1 answer
According to Mark Baker (Coordinator of the open source PHPOffice suite of libraries) ,
which doesn't work, you can only [define] one range at a time.
Source: comments above.
0
source to share