最简单的办法,就加红色的那句
<
%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from excel"
rs.open sql,conn,1,1
response.ContentType ="application/vnd.ms-excel"%>
<table width="650" border="1">
<tr>
<td>id</td>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
<% while not rs.eof %>
<tr>
<td><%= rs("id") %></td>
<td><%= rs("a") %></td>
<td><%= rs("b") %></td>
<td><%= rs("c") %></td>
</tr>
</table>
<%
rs.movenext
wend
rs.close
set rs=nothing
%>
[此贴子已经被作者于2006-4-26 19:36:45编辑过]