dqroktbn005028 2010-12-28 10:55
浏览 51
已采纳

我需要完美的xlsx以及php中的xls阅读器脚本


I am using PHPExcelReader to read uploaded xls file. But I am not able to read xlsx files saved in excel-2007 format. can someone help me on how to read xlsx file in PHP.

i have also tried PHPEXCEL , here is main code

$fileName = 'test.xlsx';
try {
    $objPHPExcel = PHPExcel_IOFactory::load($fileName);
} catch (Exception $e) {
    die("Error loading file: ".$e->getMessage()."<br />
");
}

but it gives fatal error

Fatal error: Class 'ZipArchive' not found in C:\Program Files\VertrigoServ\www\xls_reader\Classes\PHPExcel\Shared\File.php on line 53

Note: i m using Vertrigo server which have PHP Version 5.2.6

Please somebody tell me how to read xls as well as xlsx file with any suitable example or link.
Thank you very very much

  • 写回答

2条回答 默认 最新

  • duanmu5039 2010-12-28 10:58
    关注

    For EXCEL 2007 document you need the ZipArchive extension which is obviosly not available at your system. If you enable/install this extension you will be fine.

    Have a look at this link

    @diEcho: I don't develop on a windows machine so I'm afraid I can't help you with that. What I do remember from my Windows experience, i used to use XAMPP for it instead and that worked for me.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 数字取证课程 关于FAT文件系统的操作
  • ¥15 如何使用js实现打印时每页设置统一的标题
  • ¥15 安装TIA PortalV15.1报错
  • ¥15 能把水桶搬到饮水机的机械设计
  • ¥15 Android Studio中如何把H5逻辑放在Assets 文件夹中以实现将h5代码打包为apk
  • ¥15 使用小程序wx.createWebAudioContext()开发节拍器
  • ¥15 关于#爬虫#的问题:请问HMDB代谢物爬虫的那个工具可以提供一下吗
  • ¥15 vue3+electron打包获取本地视频属性,文件夹里面有ffprobe.exe 文件还会报错这是什么原因呢?
  • ¥20 用51单片机控制急停。
  • ¥15 孟德尔随机化结果不一致