Created
January 5, 2016 16:23
-
-
Save ctrl-f5/0ee59bc9153ff09774d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$excel = new \PHPExcel(); | |
$sheet = $excel->getActiveSheet(); | |
$style = new \PHPExcel_Style(); | |
$style | |
->getFill() | |
->setFillType(\PHPExcel_Style_Fill::FILL_SOLID) | |
// it's a solid color, do I have to set start or end? or are both required? | |
->setStartColor(new \PHPExcel_Style_Color(\PHPExcel_Style_Color::COLOR_RED)) | |
->setEndColor(new \PHPExcel_Style_Color(\PHPExcel_Style_Color::COLOR_RED)) | |
; | |
$cell = $sheet->getCell('A1'); | |
// can't style a cell? | |
//$cell->setStyle(...) | |
// but I have to... duplicate the styling? | |
$sheet->duplicateStyle($style, 'A1'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment