phpexcel set width

Solutions on MaxInterview for phpexcel set width by the best coders in the world

showing results for - "phpexcel set width"
Elisa
15 Jan 2021
1$this->PhpExcel->createSheet($page);
2$this->PhpExcel->setActiveSheetIndex($page);
3$sheet = $this->PhpExcel->getActiveSheet();
4
5$sheet->getColumnDimension('A')->setWidth(40);
6$sheet->getColumnDimension('B')->setWidth(28);
7$sheet->getColumnDimension('C')->setWidth(25);
8$sheet->getStyle("A8:C8")->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);