码迷,mamicode.com
首页 > Web开发 > 详细

php生成excle

时间:2014-10-16 17:40:52      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   os   sp   div   2014   on   

方法一:

新建index.php,代码如下

<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=3333.xls");

echo "A1\t B1\t C1\n";
echo "A2\t B2\t C2\n";
echo "A3\t B3\t C3\n";
?>

 

方法二:

新建index.php,代码如下

<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=3333.xls");

?>
<table width="100%%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>标题</td>
    <td>时间</td>
  </tr>
  <tr>
    <td>中韩渔船冲突再起</td>
    <td>2014-10-15</td>
  </tr>
</table>

 

php生成excle

标签:style   blog   color   io   os   sp   div   2014   on   

原文地址:http://www.cnblogs.com/wesky/p/4029126.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!