Default Backgroud

Topics: Developer Forum, User Forum
Apr 4, 2008 at 6:40 PM
How do I set the default background color for all cells to be white?

I'm new to this, and I tried the getDefaultStyle thing, but I'm lost...

Works:

$objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial');
$objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10);

Doesn't Work:
$objPHPExcel->getActiveSheet()->getDefaultStyle()->getFill()->setFillType(PHPExcelStyleFill::FILL_SOLID);
$objPHPExcel->getActiveSheet()->getDefaultStyle()->getFill()->getStartColor()->setARGB('FF808080');
Coordinator
Apr 5, 2008 at 1:21 PM
I'm not sure if it's even possible to do. Will check!