Re: [请益] phpexcel 无法读取xlsx问题

楼主: shadowjohn (转角遇到爱)   2015-12-01 17:58:36
※ 引述《b95170088 (夏恋秋分)》之铭言:
: 小弟先贴上程式
: include("./phpexcel/Classes/PHPExcel/IOFactory.php");
: include("./phpexcel/Classes/PHPExcel/Writer/Excel2007.php");
: include('./phpexcel/Classes/PHPExcel.php');
: ##读取上传EXCEL档
: $reader = PHPExcel_IOFactory::createReader('Excel2007');
: $PHPExcel = $reader->load($_FILES['strFile']['tmp_name']);
: 我上传的档案是excel 2010的档案
: php版本是5.6
: php.ini 也有设 extension=php_zip.dll
: 网络上实在找不到有人不行读取的文章,想问有人有遇到同样的问题吗
require "{$base_dir}/inc/phpExcel/Classes/PHPExcel.php";
require "{$base_dir}/inc/phpExcel/Classes/PHPExcel/IOFactory.php";
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
PHPExcel_Settings::setCacheStorageMethod($cacheMethod);
$objPHPExcel = PHPExcel_IOFactory::load($_FILES['upload']['tmp_name']);
我没载 Excel2007 你试看看我的方法行不行 :)
作者: joedenkidd (优质的蓝色射手)   2015-12-02 13:01:00
$reader= New phpexcel_reader_excel2007();

Links booklink

Contact Us: admin [ a t ] ucptt.com