1、进入项目目录,使用composer安装PHPExcel
composer require phpoffice/phpexcel

2、准备一个含有数据的Excel表格,表头和数据表中的表字段相对应

3、在ThinkPHP中引入PHPExcel类库

4、编写导入的PHP代码

5、编写导出的PHP代码

6、导出测试


时间:2026-02-15 19:30:25
1、进入项目目录,使用composer安装PHPExcel
composer require phpoffice/phpexcel

2、准备一个含有数据的Excel表格,表头和数据表中的表字段相对应

3、在ThinkPHP中引入PHPExcel类库

4、编写导入的PHP代码

5、编写导出的PHP代码

6、导出测试

