CVS的例子
<?
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";
?>
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";
?>
评论