PHP导出EXCEL简单操作
<?php02header("Content-type:application/vnd.ms-excel");
03header("Content-Disposition:attachment;filename=Export_test.xls");
04$tab="\t"; $br="\n";
05$head="编号".$tab."备注".$br;
06//输出内容如下:
07echo $head.$br;
08echo "test321318312".$tab;
09echo "string1";
10echo $br;
11
12echo "330181199006061234".$tab; //直接输出会被Excel识别为数字类型
13echo "number";
14echo $br;
15
16echo "=\"330181199006061234\"".$tab; //原样输出需要处理
17echo "string2";
18echo $br;
19?>
页:
[1]