I can generate rows dynamically like this
$row_count = 2;
for($i=0; $i < count($student_data); $i++) {
$sheet->Row($row_count, array(
$student_data[$i]->stud_number,
$student_data[$i]->first_name .' ' .$student_data[$i]->last_name
));
$row_count++;
}
$sheet->cells('A1:I'.$row_count, function($cells) {
$cells->setAlignment('center');
});
But I can't generate column dynamically, I want to do something like this
$current_column = 'C';
for($i=0; $i < count($subject_data); $i++) {
//I want here my column incremented by 1 like D, E, F, G....
//Do something..
}
You can increment alphabetically too: