最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 生成excel文件
时间:2022-06-24 19:07:17 编辑:袖梨 来源:一聚教程网
代码如下 | 复制代码 |
class excel{ var $footer = ""; ?> |
方法二
其实在做真正的应用的时候,大家可以将数据从数据库教程中取出,然后按照每一列数据结束后加t,每一行数据结束后加n的方法echo出来,在php的开头用header("content-type:application/vnd.ms-excel");表示输出的是excel文件,用header("content-disposition:filename=test.xls");表示输出的文件名为text.xls。这样就ok了。
代码如下 | 复制代码 |
header("content-type:application/vnd.ms-excel"); header("content-disposition:filename=test.xls"); echo "test1"; echo "test2"; echo "test1"; echo "test2"; echo "test1"; echo "test2"; echo "test1"; echo "test2"; echo "test1"; echo "test2"; echo "test1"; echo "test2"; ?> 方法三
echo "="411481198507150666""." "; |
相关文章
- 冒险之星鬼武者怎么样培养 08-17
- 光隙解语铁铲怎么获取 08-17
- 派对之星德瑞克技能如何 08-17
- 为了吾王圣坛有哪些作用 08-17
- 超凡先锋特殊药品有什么作用 08-17
- 斗破苍穹巅峰对决加列奥如何打 08-17