我试图转换PHP页面中名为“Update2”的表的内容。将PHP输出导出到Microsoft Excel中
这是转换器:
header("Content-type: application");
header("Content-Disposition: attachment; filename=myfilename.xls");
,这是代码部分:
<?php
$output_sql="select * from update2 where update_com_ag=1 order by update_fullname ASC";
$output_query=mysql_query($output_sql,$con);
while($output=mysql_fetch_array($output_query)){?>
<tr>
<td valign="top"><?php echo strtoupper($output['telephone_number']);?></td>
</tr>
<?php }?>
然而,让我们说,电话号码是1601000021056,在Excel文件中的输出将是1.601E + 12。有没有解决这个问题的方法?我尝试了几种方法,但仍然无法正常工作。
谢谢你们!
你为什么不把电话号码的区号与空格隔开? – reporter