一、在ThinkPHP中excel导出控件需要字段名及备注
SELECT
COLUMN_NAME,FROM information_schema.COLUMNS WHERE TABLE_NAME='xy_eventmanage'
二、查询出用editplus批量替换转换
public function outxls() { $model = D($this->dbname); $map = $this->_search(); if (method_exists($this, '_filter')) { $this->_filter($map); } $list = $model->where($map)->field('id,IdNo,Type,Type2,title,dept,submitman,RequestDesc,ULevel,SubmitWay,cjrq,tjrq,createtime,uid,uuid,uname,uuname,bumen,addtime')->select(); $headArr=array('ID','编号','类型','开发类型','标题','部门','提交人','描述','紧急度','提交方式','创建日期','提交日期','创建时间','','','','','','创建时间'); $filename='需求BUG'; $this->xlsout($filename,$headArr,$list); }