|
I am trying to put the following formula into a cell using the repeat_formula function
=IF(OR(ISBLANK(B12),ISBLANK(B11)),0,(B12-B11+IF(B12<B11,1)))
I am storing the formula like this
$intervalFormula = $worksheet->store_formula('=IF(OR(ISBLANK(B4),ISBLANK(B3)),0,(B4 - B3 + IF(B4<B3
+,1)))');
The repeat_formula call looks like this.
$worksheet->repeat_formula($i - 1, $intervalColumn, $intervalFormula, $numFormat, (B4=>'B'. $i,B3=>
+'B' . ($i - 1), B4=>'B'. $i,B3=>'B' . ($i - 1), B4=>'B'. $i, B3=>'B' . ($i - 1)));
I get the following error when i = 305.
Row B3040405 greater than 65536 in formula
If I use this repeat_formula call, it works OK except that not all the cell variables are substitut
+ed. As soon as I add three or more items to substitute, it failes.
$worksheet->repeat_formula($i - 1, $intervalColumn, $intervalFormula, $numFormat, (B4=>'B'. $i,B3=>
+'B' . ($i - 1) ));
Any ideas what I am doing wrong or is this a bug in repeat_formula?
|