错误:在CAKEPHP中调用未定义的方法PHPExcel_Calculation :: _ getMatrixDimensions()错误

时间:2019-05-09 13:18:01

标签: php cakephp cakephp-2.0 phpexcel

在使用PHPEXCEl设置cakephp中的导出excel工作表的值时,我得到对未定义方法PHPExcel_Calculation :: __ getMatrixDimensions()的调用

我的密码

$ type = PHPExcel_IOFactory :: identify($ gst_file);                 $ excel2 = PHPExcel_IOFactory :: createReader($ type);

            $excel2 = $excel2->load($gst_file);

            $excel2->setActiveSheetIndex(0);

            $excel2->getActiveSheet()->setCellValue('C11', 1500)
                ->setCellValue('D11', 100);



                ob_end_clean();

            header('Content-Type: application/vnd.ms-excel');
            header('Content-Disposition: attachment;filename="gstr_one_To.xlsx"');
            header('Cache-Control: max-age=0');

            header('Cache-Control: max-age=1');


            header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
            header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
            header ('Pragma: public'); 
            $objWriter = PHPExcel_IOFactory::createWriter($excel2, 'Excel5');

            $objWriter->save('php://output');

0 个答案:

没有答案