欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

asp導(dǎo)出excel文件最簡(jiǎn)單方便的方法

 更新時(shí)間:2014年08月07日 11:05:01   投稿:junjie  
這篇文章主要介紹了asp導(dǎo)出excel文件最簡(jiǎn)單方便的方法,幾行代碼就可以搞定,非常簡(jiǎn)單實(shí)用,需要的朋友可以參考下

由于excel軟件能識(shí)別table格式的數(shù)據(jù),所以asp只需要輸出table格式的html代碼,同時(shí)設(shè)置好contenttype,增加保存為附件的響應(yīng)頭即可將輸出的html代碼保存為xls文件。

asp導(dǎo)出excel文件源代碼如下:

復(fù)制代碼 代碼如下:

<%
Response.ContentType = "application/excel"
Response.AddHeader "Content-Disposition", "attachment;filename=""xxxx.xls"""
%>
<table>
<%while not rs.eof %>
<tr><td>你的excel單元格內(nèi)容,有多個(gè)自己增加td</td></tr>
<%
 rs.movenext
 wend
%>
</table>

相關(guān)文章

最新評(píng)論