PHP生成Excel,然后另存为的方法
1.以下方法是直接下载(显示另存为)一个test1.xls的Excel表。
header("Content-type:application/xls"); header("Content-Disposition:attachment;filename=test1.xls"); echo "test1/t"; |
2.下面是直接在IE中打开Excel表的header
header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:filename=test.xls"); echo "test1/t"; |
本文出自 “振中的技术记事本” 博客,请务必保留此出处http://speedphp.blog.51cto.com/1904268/623906
相关新闻>>
- 发表评论
-
- 最新评论 更多>>