新手请教php输出excel问题,代码如下,输出后有表格,但是其他地方都是空白,而不是通常的空格,如下图 10
<?phpheader("Content-type:application/vnd.ms-excel");header("Content-Disposition:file...
<?php
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=php100.xls");
?>
<meta http-equiv="Content-type" content="charset=UTF-8"/>
<table width=200 border=1>
<tr>
<td colspan=3 align='center'><font color='red' size=5>统计</font></td>
</tr>
<tr>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
</tr>
<tr>
<td>张三</td>
<td>35</td>
<td>男</td>
</tr>
<tr>
<td>李四</td>
<td>36</td>
<td>女</td>
</tr>
<tr>
<td>王五</td>
<td>38</td>
<td>男</td>
</tr>
</table> 展开
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=php100.xls");
?>
<meta http-equiv="Content-type" content="charset=UTF-8"/>
<table width=200 border=1>
<tr>
<td colspan=3 align='center'><font color='red' size=5>统计</font></td>
</tr>
<tr>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
</tr>
<tr>
<td>张三</td>
<td>35</td>
<td>男</td>
</tr>
<tr>
<td>李四</td>
<td>36</td>
<td>女</td>
</tr>
<tr>
<td>王五</td>
<td>38</td>
<td>男</td>
</tr>
</table> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询