php导出xls文件的方法
时间:2021-07-01 10:21:17
帮助过:15人阅读
- header("content-type: application/vnd.ms-excel");
- header("content-disposition: attachment; filename=example.xls");
- //注意下面的head必须,charset必须跟你将要输出的内容的编码一致,否则用excel打开时,可能得到的是乱码。
- echo <<
- php output excel example
-
| 姓名 | -
| 编号 | -
| 性别 | -
| 生日 | -
| 城市 | -
| 奥运 | -
| 9527 | -
| 男 | -
| 2008-08-08 | -
| 北京 |
- eot;
- ?>
|