I i have a phpexcel page with 2 worksheets and on one that is using condinal formatting and its pulling the data out of a database and i am wanting to use the row number in to select how far to place the conditional formatting so i have this variable which is auto incremented to place the the data into each row
$rownumber++
then i have this peice of code
$objPHPExcel->getActiveSheet()->duplicateConditionalStyle(
$objPHPExcel->getActiveSheet()->getStyle('I2')->getConditionalStyles(),
'I2:K4'
);
what i am wanting to do is where it has
I2:K4 i want it be something like this
I2:K$rownumber
so that uses the auto increasing row number to know how far to put the conditional formating but i have been unsuccesful in trying to get anything like this to work for me so if anyone has an idea how to do this please i need some help
The range argument is just a standard PHP string, so you can use standard PHP string concatenation like ‘I2:K’.$rownumber