I am using PHPExcel and I need to perform a For incrementing the column, For example:
for ($i = 'J'; $i <= 'J' + $num; $i++) {
$objPHPExcel->setActiveSheetIndex(0)
->setCellValue($i . '11', $cabecera[$j]);
$j++;
}
$ header is an array with a variable number of elements and it is the texts that I want to print in the excel to generate and $ num is the number of elements that this arrangement has.
When executing the code I see that varibale $ i increases correctly.
For $ num = 3 I should print up to column 'L', because I understand that
:
'J' + $num = 'M' y 'L' < 'M'
However, the process does not leave For and continues to increase
Can anyone give me some guidance on how I can make this column increase according to the number of elements in an array?