我試圖轉換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