zoukankan      html  css  js  c++  java
  • 使用spreadsheet-reader流式读取超大excel文件

    github:https://github.com/nuovo/spreadsheet-reader

    最近有一个读取超大excel文件的功能需求,使用的phpexcel,有严重的内存泄露问题,暂时还未找到解决方案。

    spreadsheet-reader是流式读取excel的,对于大多数格式的excel都能正常的读取,且内存消耗很小。

    PS:其中遇到的坑

    xlsx文件一定要标准,也就是必须是offce生成的,而不是wps之类的……被这个坑了很久

    如果不正确会出现如下报错,个人猜测是文件头问题,建议用office打开另存为一份就没问题了

    Warning: XMLReader::open(): Empty string supplied as input in C:myphp_wwwPHPTutorialWWWspreadsheet-reader-masterSpreadsheetReader_XLSX.php on line 959

    Warning: XMLReader::read(): Load Data before trying to read in C:myphp_wwwPHPTutorialWWWspreadsheet-reader-masterSpreadsheetReader_XLSX.php on line 995

    Notice: Undefined variable: i in C:myphp_wwwPHPTutorialWWW est.php on line 10
    Array ( ) 
    Warning: XMLReader::read(): Load Data before trying to read in C:myphp_wwwPHPTutorialWWWspreadsheet-reader-masterSpreadsheetReader_XLSX.php on line 995

  • 相关阅读:
    Quartz使用总结
    ubuntu 16.04 下载源
    samba搭建
    搭建FTP服务器
    ubuntu 快捷图标
    mysql Fatal error encountered during command execution
    vs2013调试的时候卡顿
    javascript父窗口与子窗口通信
    mysql设置字体
    前台声明变量
  • 原文地址:https://www.cnblogs.com/Lynwood/p/9417035.html
Copyright © 2011-2022 走看看