1.以下方法是直接下载(显示另存为)一个test1.xls的Excel表。
<? header("Content-type:application/xls"); header("Content-Disposition:attachment;filename=test1.xls"); echo "test1/t"; |
2.下面是直接在IE中打开Excel表的header
<? header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:filename=test.xls"); echo "test1/t"; |