Conditional formatting

Topics: Developer Forum, User Forum
Jun 13, 2011 at 9:03 AM

Hi,

I have had a couple of issues when using conditional formatting.

Firstly within a conditional format if I do not set the number format explicitly then the number formatting of the rest of the worksheet reverts to 'General'.  This is easily solved by explicitly setting the format, but seems a little odd.

Secondly (and what I haven't solved) is that attempting to change the fill pattern on a cell within a conditional format always seems to result in a solid fill in black.  This is what I have been using for the conditional format

$objcond->getStyle()->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setARGB('FFCCFFFF');

A similar statement works for simple formatting.  I would be grateful to know if I am doing something wrong.

 

Thanks

Nov 24, 2011 at 6:29 PM

Hi, I've experimented the same issue... to solve it I used this code:

$objcond->getStyle()->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getEndColor()->setARGB('FFCCFFFF');

Nov 25, 2011 at 6:59 AM

Many Thanks.

Oct 15, 2014 at 4:36 PM
See: https://phpexcel.codeplex.com/workitem/21454 for your issues with reverting number formats in conditional formatting. This should be fixed soon.