简体   繁体   English

PHPExcel错误地将xls文件读取为HTML

[英]PHPExcel wrongly reading xls file as HTML

I am using PHPExcel to read a large "xls" file. 我正在使用PHPExcel读取大型“ xls”文件。 Firstly, I am determining the file type for reader using PHPExcel_IOFactory::identify($inputFileName) . 首先,我使用PHPExcel_IOFactory::identify($inputFileName)读取器的文件类型。 However, PHPExcel is wrongly identifying it as HTML file and using HTML Reader which fails with DOM errors. 但是,PHPExcel错误地将其标识为HTML文件,并使用HTML读取器,该读取器因DOM错误而失败。

After some searching, I found that PHPExcel does not work well with stream wrappers. 经过一番搜索,我发现PHPExcel无法与流包装器一起很好地工作。 Refer here . 请参考这里

I have no idea what stream wrappers are, and the file I am trying to read is downloaded using wget. 我不知道什么是流包装器,而要读取的文件是使用wget下载的。

Please let me know how to remove the stream wrappers, so that PHPExcel can identify the file correctly. 请让我知道如何删除流包装,以便PHPExcel可以正确识别文件。

Thank you. 谢谢。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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