Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet
$this->activeSheet = $this->PHPExcel->createSheet();
Setting the sheet title:
$this->activeSheet
->setTitle($title);
Getting/setting the active worksheet.
$this->activeSheet = $this->PHPExcel->getActiveSheet();
$sheetIndex = 2;
$this->PHPExcel->setActiveSheetIndex($sheetIndex)
Setting the width of a specific column.
$this->activeSheet
->getColumnDimension($colString)
->setWidth($width);
Setting the default column width/row height for a sheet.
$this->activeSheet
->getDefaultColumnDimension()
->setWidth($width);
$this->activeSheet
->getDefaultRowDimension()
->setRowHeight($height);
// Setting default styles for the active sheet $this->activeSheet ->getDefaultStyle()->applyFromArray($this->defaultStyle);