简体   繁体   中英

PHPExcel wrongly reading xls file as HTML

I am using PHPExcel to read a large "xls" file. Firstly, I am determining the file type for reader using PHPExcel_IOFactory::identify($inputFileName) . However, PHPExcel is wrongly identifying it as HTML file and using HTML Reader which fails with DOM errors.

After some searching, I found that PHPExcel does not work well with stream wrappers. Refer here .

I have no idea what stream wrappers are, and the file I am trying to read is downloaded using wget.

Please let me know how to remove the stream wrappers, so that PHPExcel can identify the file correctly.

Thank you.

将文件下载到服务器上的本地驱动器,即使只是作为临时文件,也请尝试识别/读取它。...但是PHPExcel的大多数Reader都使用fseek() ,许多阅读器均不支持。流包装器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM