:<%
'On Error Resume Next
Set xlApp=server.CreateObject("Excel.Application")
xlApp.DisplayAlerts = false
xlApp.Application.Visible = false
strsource = Server.MapPath("test.xls")
Set xlbook = xlApp.Workbooks.Open(strsource)
Set xlsheet = xlbook.Worksheets(1)
dim i
i=1
while xlsheet.cells(i,1)<>""
t1 = xlsheet.Cells(i,1)
t2 = xlsheet.Cells(i,2)
Response.Write t1&"|"&t2&"<br>"
'这里进行数据库操作
i=i+1
wend
set xlsheet=nothing
set xlbook=nothing
xlApp.Quit
Set xlApp=Nothing