Excel制作+导出

//模板地址:https://blog.csdn.net/qq_38003021/article/details/79981193
$csvPathFile = 'X:\mysoft\myServer\www\localhost\data\123.xls';//自制模板

$startDay = '2017-10';
$endDay = '2017-11';
$dataList = [
['name' => '学历不够,技术来凑', 'value' => '中国', 'coin' => 1, 'time' => 1523810619 ],
['name' => '学历不够,技术来凑2', 'value' => '法国', 'coin' => 2, 'time' => 1523810622 ],
['name' => '学历不够,技术来凑3', 'value' => '英国', 'coin' => 3, 'time' => 1523810633 ],
['name' => '学历不够,技术来凑4', 'value' => '德国', 'coin' => 4, 'time' => 1523810654 ],
];
header("Content-Type: application/vnd.ms-excel;charset=utf-8");
header("Content-Disposition: attachment; filename=bbb.xls" );
header("Pragma: no-cache");
header("Expires: 0");

include($csvPathFile);

exit;
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页