什么叫简单,把数据库的数据导入到excel就行了, 这个就是简单了
下面看一段代码(代码来自网络)
注意要双引号的字符串
复制代码 代码如下:
<?php
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 ";
?>
运行就会下载test.xls这个文件,打开以后他是这样的

发表评论