<? header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:filename=test.xls"); /* 格式: 換行:"\t\n": 單元格之間: "\t" */ 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"; //改動相應文件頭就能夠輸出.doc .xls等文件格式了 ?>