I want to execute this sum formula, but I am filling the cells with columns and rows, how can I get the name of the last column to place it in the range
$sheet->setCellValueByColumnAndRow($col, $row, $score);
$sheet->setCellValueByColumnAndRow(($col + 1), $row, "=SUM(E{$row}:{$col_name}{$row})");
$sheet->getCellByColumnAndRow(($col + 1), $row)->getCalculatedValue();
I tried
$sheet->setCellValueByColumnAndRow($col, $row, "=SUM(E{$row}:{$sheet->getCellByColumnAndRow($col, $row)})");