数据库内容太多,复制粘贴太麻烦?
那就用代码实现把,把代码写好了,导出还不容易吗,访问即可导出。excel.php
"; echo ""; echo "A1单元格"; echo "B1单元格"; echo "C1单元格"; echo "D1单元格"; echo ""; echo ""; while($row=mysql_fetch_array($result)){ //下面data改成你自己数据库对应的字段 $data1 = $row["data1"]; $data2 = $row["data2"]; $data3 = $row["data3"]; $data4 = $row["data4"]; //输出字段的数据到单元格 //下面data改成你自己数据库对应的字段 echo "
$data1 | "; echo "$data2 | "; echo "$data3 | "; echo "$data4 | "; echo "
然后访问excel.php就可以弹出表格下载了。
作者:TANKING网站:likeyunba.com微信:likeyunba520