I have to implement a formula so that selected cells SUM and Average will display to the bottom of sheet-like below in the red highlighted rectangle.
I have gone through some examples but none of them is close to this requirement.
Here is part of my code
$objPHPExcel->getActiveSheet()->setCellValue("A$i", $totalItemPrice);
$objPHPExcel->getActiveSheet()->getStyle("A$i")->getNumberFormat()->setFormatCode('"$"#,##0.00_);[Red]("$"#,##0.00)');
question from:https://stackoverflow.com/questions/65844334/php-excel-display-sum-and-average-of-selected-cells-at-the-bottom-of-sheet