How to set border color of a cell? I used this code, but it's not working:
$objPHPExcel->getActiveSheet()
->getStyle('A1')
->getBorders()
->getAllBorders()
->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN)
->getColor()
->setRGB('DDDDDD');
I know
applyFromArray()
works fine. But I don't want to use it.
A bit late, but for the record, I found that this syntax worked fine;
$ActiveSheet->getStyle("A1:Z1")->applyFromArray(
array(
'borders' => array(
'allborders' => array(
'style' => PHPExcel_Style_Border::BORDER_THIN,
'color' => array('rgb' => 'DDDDDD')
)
)
)
);
I also found a complete list of styles and attributes here: http://www.bainweb.com/2012/01/phpexcel-style-reference-complete-list.html