Problem with Conditional formatting of cells

Topics: Developer Forum, Project Management Forum, User Forum
Aug 22, 2012 at 8:30 AM
Edited Aug 22, 2012 at 8:34 AM

Hi i have some problem with formatting the background color of cell depending on the values in the cell eg: For whole column c if the values is 3 or 4 the background color of that particular cell should be indicated  in red color. likewise i should check and format the cell background color for all the values in C column.

Here's my code.

$condition_style = array('type' => PHPExcel_Style_Fill::FILL_SOLID, 'endcolor' => array('rgb' => 'ff0000'));
$objConditional = new PHPExcel_Style_Conditional();             





$conditionalStyles = $objWorksheet_special->getStyle('C')->getConditionalStyles();               

array_push($conditionalStyles, $objConditional);               



This above code doesn't work and i don't know what am missing. Can any one help me in figuring this out!!!