<% Server.ScriptTimeOut=9999999 %>
<html>
<title>题库导入</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body>
<!-- #i nclude file="Conn.asp" -->
<%
set rs=server.CreateObject("adodb.recordset")
update_sql="select xingming,b,c,d from biao"
rs.open update_sql,conn,2,3
Set xlApp = server.CreateObject("Excel.Application")
strsource = server.mappath("1.xls")
Set xlbook = xlApp.Workbooks.Open(strsource)
Set xlsheet= xlbook.Worksheets(1)
i=1
do while (not xlsheet.cells(1,i)="")
i=i+1
loop
ii=i-1
RecNo=1
j=2
Do While (xlsheet.cells(j,1)<>"")
rs.addnew
i=1
for i=1 to ii
rs(i-1)=xlsheet.cells(j,i)
next
j=j+1
rs.update
RecNo=RecNo+1
Loop
if err.number=0 then
response.Write("<script>alert('导入成功!注意不能再刷新!')</script>")
end if
rs.close
set rs=nothing
set db=nothing
xlBook.Close (True) '关闭工作簿
xlApp.Quit '结束EXCEL对象
Set xlApp = Nothing '释放xlApp对象
%>
</body>
</html>
红色地方出现
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。