时间:2021-07-01 10:21:17 帮助过:18人阅读
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";
?>
运行就会下载test.xls这个文件,打开以后他是这样的
http://www.bkjia.com/PHPjc/730054.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/730054.htmlTechArticle生成excel 当然使用的是 phpExcel这个类库了,可是它太麻烦了,对于只要简单生成来说有点不值得 什么叫简单,把数据库的数据导入到excel就行了...