1.请高手帮忙!码分!码分!码分wpe封包发送源码用ASP如何生成excel报表 本人原意贡献所有积分谢谢!码分!码分农场果子游戏源码!码分网页 表格 打印 源码
请高手帮忙!码分!码分!码分用ASP如何生成excel报表 本人原意贡献所有积分谢谢!码分!码分!码分
给你个例子
<HTML>
<HEAD>
<meta content="text/html; charset=gb" http-equiv="Content-Type">
<TITLE>生成EXCEL文件</TITLE>
</HEAD>
<body>
<a href="dbtoexcel.asp?码分微信头像源码act=make">在线生成EXCEL</a>
<hr size=1 align=left width=px>
<%
if Request("act") = "" then
Response.Write "生成EXCEL文件"
else
dim conn,strconn
strconn="driver={ SQL Server};server=wen;uid=sa;pwd=;database=DB_Test"
set conn=server.CreateObject("adodb.connection")
conn.Open strconn
dim rs,sql,filename,fs,myfile,x
Set fs = server.CreateObject("scripting.filesystemobject")
filename = Server.MapPath("online.xls")
if fs.FileExists(filename) then
fs.DeleteFile(filename)
end if
set myfile = fs.CreateTextFile(filename,true)
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select * from Tb_Execl order by id desc"
rs.Open sql,conn,1,1
if rs.EOF and rs.BOF then
else
dim strLine,responsestr
strLine=""
For each x in rs.fields
strLine = strLine & x.name & chr(9)
Next
myfile.writeline strLine
Do while Not rs.EOF
strLine=""
for each x in rs.Fields
strLine = strLine & x.value & chr(9)
next
myfile.writeline strLine
rs.MoveNext
loop
end if
rs.Close
set rs = nothing
End If
%>
2024-11-29 21:411661人浏览
2024-11-29 21:322383人浏览
2024-11-29 20:351323人浏览
2024-11-29 20:231416人浏览
2024-11-29 20:18107人浏览
2024-11-29 20:112078人浏览
1.Top3 最好的windows数据恢复软件免费获取2.数据恢复软件哪个好?10款好用的数据恢复软件推荐免费和付费)Top3 最好的windows数据恢复软件免费获取 嗨格式数据恢复大师是一款专