Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
641 views
in Technique[技术] by (71.8m points)

phpexcel - PHP Excel display sum and average of selected cells at the bottom of sheet

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.

enter image description here

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...