php 简单的Excel导出

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
$date = date("YmdHis");
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=名称$date.xls");
header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
?>
<table cellpadding="0" cellspacing="0">
<thead>
    <th>序号</th>
</thead>
<tbody>
    <tr>
        <td>这里是输出的内容</td>
    </tr>
</tbody>
    原文作者:alex
    原文地址: https://segmentfault.com/a/1190000009144099
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞