您现在的位置是:网站首页> 编程资料编程资料
asp将table生成excel文件(xls)_应用技巧_
2023-05-25
329人已围观
简介 asp将table生成excel文件(xls)_应用技巧_
复制代码 代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if request("action")=1 then
Response.ContentType="application/ms-excel"
Response.AddHeader "content-disposition","attachment;filename=www.xls"
end if
%>
<%
ConnStr="..."
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
set rs = server.CreateObject("adodb.recordset")
rs.open "select top 10 * from [你的表名]",conn,1,1
if not (rs.eof and rs.bof) then
column = rs.fields.count
response.Write("
| 序号 | ")" & f.name & " | ")
| " & j & " | ")" & rs(i) & " | ")
end if
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
您可能感兴趣的文章:
相关内容
- 防盗链接ASP函数_小偷/采集_
- asp 小偷采集程序原理与常用函数方法_小偷/采集_
- 有效防止ASP木马上传运行—小知识[网络安全技术]_木马相关_
- set rs=server.CreateObject("adodb.recordset") 的中文详细说明_数据库相关_
- 隐蔽的ASP后门 大家可以查看下_木马相关_
- 服务器XMLHTTP(Server XMLHTTP in ASP)基础知识_应用技巧_
- asp 在线备份与恢复sqlserver数据库的代码_数据库相关_
- Active Server Pages 错误 'ASP 0201' 修复方法_应用技巧_
- asp下以Json获取中国天气网天气的代码_小偷/采集_
- asp定时生成静态HTML的代码_应用技巧_
