本文实例讲述了ThinkPHP框架实现导出excel数据的方法。分享给大家供大家参考,具体如下:
在ThinkPHP框架下,导出excel数据的方法示例:
在操作前,应该在系统框架的扩展目录中添加ORG库,即要包含ThinkPHP\Extend\Library\ORG\Util\PHPExcel.class.php文件及其相关支持文件。
<?php
header("Content-type: text/html; charset=utf-8");
class MesTestAction extends Action {
//测试导出excel数据
public function tp