public function generateFooter()
{
$row = $this->_endRow + $this->_beginRow;
$footerExists = false;
$columns = $this->getVisibleColumns();
if (count($columns) == 0) {
return;
}
$this->_endCol = 0;
foreach ($this->getVisibleColumns() as $n => $column) {
$this->_endCol = $this->_endCol + 1;
if ($column->footer) {
$footerExists = true;
$footer = trim($column->footer) !== '' ? $column->footer : $column->grid->blankDisplay;
$cell = $this->_objPHPExcel->getActiveSheet()->setCellValue(self::columnName($this->_endCol) . ($row + 1), $footer, true);
$this->raiseEvent('onRenderFooterCell', [$cell, $footer, $this]);
}
}
if ($footerExists) {
$row++;
}
return $row;
}