一个有关EXCEL的问题

mayaboy 2003-12-12 02:35:46
<%
Set conn = Server.CreateObject("ADODB.Connection")
Driver = "Driver={Microsoft Excel Driver (*.xls)};"
DBPath = "DBQ=" & Server.MapPath( "edata.xls" )
conn.Open Driver & DBPath
%>


显示页面
<!--#include file="dbconn.asp"-->
<html>
<%
dim sql
dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From [Sheet1$]", conn, 2, 2
%>
<head>
<title>open</title>
</head>
<body text="#000000" link="#000000" vlink="#000000" alink="#000000" leftmargin="0" bgcolor="#FFFFFF">
<table width="13%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="41"><font color="#000066"><b><font size="3"><%=rs("A")%></font></b></font></td>
</tr>
</table>
</body>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

这样会出错,请问怎样才能正常显示?
...全文
61 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧