举个excel的例子:<?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
?>
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.xls");
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
echo "test1\t";
echo "test2\t\n";
?>
解决方案 »
- php 链接数据库 怎么修改select到的数据最大值
- 关于数组的问题,请各位给点思路!
- 怎么用获取一个文件的hash值 ,找了半天没找到。帮帮忙~~
- 第七世界开发组委托发帖:欢迎大家参与这个开放游戏平台的开发
- 20分求助一下PHP的编译问题
- 请问不用COM组件可否用php生成word,excel格式的文件?因为是linux平台
- 一个菜鸟想用PHP连接FOXPRO数据表能否实现??
- 谁有和极限oa功能差不多的php oa系统原代码下?
- php可以把图片转成二进制文件么????急!!!!!!!
- 关于SESSION的莫名其妙的问题
- 如何把查询到结果的PHP页面用邮件方式发送??
- PHP中有没有像ASP中的global.asa文件一样的功能
<?
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=test.csv");
echo "test1,";
echo "test2,";
echo "test1,";
echo "test2,";
echo "test1,";
echo "test2,";
echo "test1,";
echo "test2,";
echo "test1,";
echo "test2,";
echo "test1,";
echo "test2\t\n";
?>
e,f,g,hthis is the format of csv files.