PHPExcel_Reader_Exception: is not recognised as an OLE file in Classes
2017-04-28 16:06
1256 查看
PHPExcel导入excel.xlsx报错 后面接着 file in Classes\PHPExcel\Shared\OLERead.php on line 89这种错误的都是因为 createReader的 文件后缀名类型 出错了xlsx是excel2007的
可以这么解决
$temp[1]是文件后缀名 判断一下就好了 不会报错了 希望对新手有所帮助
可以这么解决
if($temp[1] =='xlsx' ){ $objReader = PHPExcel_IOFactory::createReader('excel2007'); }else{ $objReader = PHPExcel_IOFactory::createReader('Excel5'); }
$temp[1]是文件后缀名 判断一下就好了 不会报错了 希望对新手有所帮助
相关文章推荐
- PHPExcel的exception 'Exception' with message 'The filename is not recognised as an OLE file问题解决
- php 使用 Excel/reader.php, 导入excel到数据库 ,解决The file is not readable。。
- The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider i 推荐
- The Excel Connection Manager is not supported in the 64-bit version of SSIS, as no OLE DB provider i
- Android Studio添加应用作为依赖时报错Error:Dependency MonthText:xlistview:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: 及其解决方案
- xcode编译静态库时:**** is not an object file (not allowed in a library)
- 自建Yii项目进入shell 出现Error: index.php does not exist or is not an entry script file.
- 'VBoxManage' is not recognized as an internal or external command, operable program or batch file.
- Mysql 出现错误The server is not configured as slave; fix in config file or with CHANGE MASTER TO
- jmeter3.2生成图形html遇到的问题Error in NonGUIDriver java.lang.IllegalArgumentException: Results file:log is not empty
- 使用phpExcelReader操作excel提示The filename *.xls is not readable的详细解决方法
- iOS XXXXX is not an object file (not allowed in a library)
- 'winrar' is not recognized as an internal or external command, operable program or batch file.
- Fixing the "There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
- linux 下搭建Nginx+php报错open_basedir restriction in effect. File(/var/www/html/index.php) is not within
- jetty 跑 Java Exception:"PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is r
- 解决"There is already an open DataReader associated with this Command which must be closed first." exception in EF 中
- Warning: array_merge() [function.array-merge]: Argument #2 is not an array in e\\class\\functions.php on line 2193
- ’javac’ is not recognized as an internal or external command,operable program or batch file.
- 'powershell' is not recognized as an internal or external command, operable program or batch file