Nov 5, 2010 at 9:26 AM
Edited Nov 5, 2010 at 2:01 PM
I'm generating a XLS2007-File by reading a template, filling it with data and write it back. This is working well. Now I'm trying to add the conditional-formats of the template to other cells.
Basically I want to have the conditional-format of the template-row (e.g. row 4) on row 5..x.
$conditionalStyle = $objPHPExcel->getActiveSheet()->getStyle('K4')->getConditionalStyles();
The condition is set correctly. So I have the same condition on row 5 as on the (template-) row nr. 4.
Unfortunately my condition looks like:
_text = NULL
 => 'AND(EXACT(K4,Y4),VALUE(LEN(Y4))>0)'
As you can see I need to manipulate the _condition to match the row-number. In fact every occurance of "4" needs to be changed to the actual row-number (e.g. 5).
I have somthing like the following in mind:
Read content of _condition -> manipulate it -> write it back to the object
Could this be done? How?
PHPExcel 1.7.4 - PHP 5.2.6-1 on debian