composer require phpoffice/phpexcel

This commit is contained in:
sugar1569 2018-09-20 10:46:12 +08:00
parent 6e7ffc8a36
commit df2a84a67b

View File

@ -62,7 +62,7 @@ class PHPExcelService
*/ */
private static function initialize($data,$fun){ private static function initialize($data,$fun){
// vendor("PHPExcel.PHPExcel.PHPExcel"); // vendor("PHPExcel.PHPExcel.PHPExcel");
// self::$PHPExcel= new \PHPExcel(); self::$PHPExcel= new \PHPExcel();
if($fun!==null && is_callable($fun)){ if($fun!==null && is_callable($fun)){
self::$styleArray=$fun(); self::$styleArray=$fun();
} }
@ -177,6 +177,7 @@ class PHPExcelService
self::$title=$title; self::$title=$title;
if(empty($Name)) $Name=time(); if(empty($Name)) $Name=time();
//设置Excel属性 //设置Excel属性
self::$PHPExcel = new \PHPExcel();
self::$PHPExcel ->getProperties() self::$PHPExcel ->getProperties()
->setCreator("Neo") ->setCreator("Neo")
->setLastModifiedBy("Neo") ->setLastModifiedBy("Neo")