2个回答
展开全部
'读取x行y列
set Conn=Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("ADODB.Recordset")
strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("1.xls")+";Extended Properties='Excel 8.0;HDR=no;IMEX=1'"
Conn.Open strConn
sql="SELECT * FROM [data$]"
rs.Open sql,Conn,1,1
if not rs.eof then
rs.move x
response.Write rs(y-1)
end if
rs.Close
Conn.Close
set rs = Nothing
set Conn = Nothing
set Conn=Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("ADODB.Recordset")
strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath("1.xls")+";Extended Properties='Excel 8.0;HDR=no;IMEX=1'"
Conn.Open strConn
sql="SELECT * FROM [data$]"
rs.Open sql,Conn,1,1
if not rs.eof then
rs.move x
response.Write rs(y-1)
end if
rs.Close
Conn.Close
set rs = Nothing
set Conn = Nothing
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询