phpexcel format cell background color

Solutions on MaxInterview for phpexcel format cell background color by the best coders in the world

showing results for - "phpexcel format cell background color"
Valentina
11 Jun 2018
1$page = 0;
2$this->PhpExcel->createSheet($page);
3$this->PhpExcel->setActiveSheetIndex($page);
4$sheet = $this->PhpExcel->getActiveSheet();
5
6$sheet->getStyle("A1:A7")->applyFromArray(
7  array(
8    'fill' => array(
9      'type' => PHPExcel_Style_Fill::FILL_SOLID,
10      'color' => array('rgb' => 'FFE699')
11    ),
12    'borders' => array (
13      'allborders' => array (
14        'style' => PHPExcel_Style_Border::BORDER_THIN,
15        'color' => array('rgb' => '000000'),        // BLACK
16      )
17    )
18  )
19);