2016.01.25CI框架加载PHPExcel

CI框架加载PHPExcel

下载phpexcel,放在application/libraries目录下

只需要把Classes下的问价拿出来,如下:

require_once '/application/libraries/PHPExcel.php';

require_once '/application/libraries/PHPExcel/IOFactory.php';

require_once '/application/libraries/PHPExcel/Reader/Excel5.php';

$file = 'application/lead.xlsx';//Excel文件,可以是上传的

$objPHPExcel = PHPExcel_IOFactory::load($file);

$arrExcel = $objPHPExcel->getSheet(0)->toArray();

var_dump($arrExcel);

你可能感兴趣的:(2016.01.25CI框架加载PHPExcel)