Color difference in reading XLSX / XLS file

Topics: Developer Forum, User Forum
Aug 18, 2012 at 8:48 AM

I am dealing with PHPExcel for a while and I noticed that the reader returns the colour code which is different in Excel sheet.

Is there any server requirement which is limiting the code to not return the exact color?

I am using the given set of codes for this:


for($row=2;$row<=count($data);$row++) {
                                        if($data[$row]["B"] == "") continue; // skip the rows with blank details (checks the auction Type)
                                        $colInt = 0;
                                        foreach($heading as $col => $head) {
                                            if($head == "" || $head=='Quarter' || $head=='Day') continue; // skip the column with no heading
                                            $sheetdata[$row][$head] = $data[$row][$col];
                                            $sheetcolor[$row][$head] = "#".$objPHPExcel->getActiveSheet()->getStyle($col.$row)->getFill()->getStartColor()->getRGB();

I have also noticed that, the colour retured is lighter and light green is converted to Yellow color.


Please help.

Thanks in Advance.

Aug 18, 2012 at 10:11 AM

What reader are you using?

i've just checked with 2007 reader and color found are just right