28,391
社区成员
发帖
与我相关
我的任务
分享
<div>
<table border="1" cellspacing="1" cellpadding="2">
<tr style="font-weight:bold;color:blue;"><th>标题1</th><th>标题2</th><th>标题3</th></tr>
<tr><td style="width:86px;">行1内容1</td><td style="width:86px;">行1内容2</td><td style="width:86px;">行1内容3</td></tr>
<tr><td>行2内容1</td><td>行2内容2</td><td>行2内容3</td></tr>
<tr><td>行3内容1</td><td>行3内容2</td><td>行3内容3</td></tr>
<tr><td colspan="3">footer</td></tr>
</table>
</div>
<%
Response.Expires = 0
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
'Response.ContentType = "application/msword"
Response.AddHeader "Content-Disposition", "inline; filename=文件名.xls"
'Response.AddHeader "Content-Disposition", "inline; filename=文件名.doc"
%>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from table",conn,1,1
if not(rs.EOF and rs.BOF) then
%>
<%
do while not rs.eof
%>
<% = rs("0") %>
<%
rs.movenext
loop
rs.close
end if
%>