PHPExcel: How to Get COLOR

I am using the PHPExcel project, but I have a question, and without a solution on the ground.

I have been looking for this question for a while, but I CAN’t find a way to get the COLORS OF COLORS!

I tried using the getColor () method or what ... it does not work or just shows a warning ...

Can someone please tell me how to get CELL COLOR using PHPExcel? THANKS

+5
source share
3 answers
$objPHPExcel->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->getARGB();

or

$objPHPExcel->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->getRGB();
+16
source

cell.it

$objPHPExcel->getActiveSheet()->getStyle('A1')->getFill()->applyFromArray(array('type' => PHPExcel_Style_Fill::FILL_SOLID,'startcolor' => array('rgb' =>'FF1E1E')
0

All Articles