首先用到 PHPexcel,官网地址 :https://packagist.org/packages/phpoffice/phpexcel安装方法:composer require phpoffice/phpexcel
[root@xxxx]# composer require phpoffice/phpexcel
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
Using version ^1.8 for phpoffice/phpexcel
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing phpoffice/phpexcel (1.8.1)
Downloading: 100%
Writing lock file
Generating autoload files
安装完成。。。。
引用:
use PHPExcel;
use PHPExcel_IOFactory;
实例化…