Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP电子表格颜色不工作_Php_Phpexcel - Fatal编程技术网

PHP电子表格颜色不工作

PHP电子表格颜色不工作,php,phpexcel,Php,Phpexcel,我正在尝试使用以下函数将collors应用于我的单元格: function color($cell, $color, $find = true){ if ($find){ $color = $this->color_helper($color); } $this->sheet->getStyle($cell)->getFill()->applyFromArray(array(

我正在尝试使用以下函数将collors应用于我的单元格:

function color($cell, $color, $find = true){
        if ($find){
            $color = $this->color_helper($color);
        }

        $this->sheet->getStyle($cell)->getFill()->applyFromArray(array(
            'type' => PHPExcel_Style_Fill::FILL_SOLID,
            'startcolor' => array(
                'rgb' => $color
            )
        ));
    }
颜色是在颜色选择器函数中定义的,它们返回类似“FF0000”的红色


现在的问题是,在我下载文件后,没有任何更改,就像原始文件一样。

您保存了更改吗?我想是的,这是我的代码。