如何直接调用Excel数据?

作者:袖梨 2022-06-30
<%@language=vbscript %>
<%
Set exlApp = server.CreateObject("Excel.Application")
strsource = "e:excelsample.xls"
' 数据库位置
Set exlstock = exlApp.Workstocks.Open(strsource)
Set exlsheet = exlstock.Worksheets(1)
i=1
response.write ""
while exlsheet.cells(i,1)<>""
response.write ""
response.write " "
response.write " "
response.write " "
response.write ""
i=i+1
wend
response.write "
" & xlsheet.Cells(i, 1) & "" & xlsheet.Cells(i, 2) & "" & xlsheet.Cells(i, 3) & "
"
set xlsheet=nothing
set xlstock=nothing
xlApp.quit
%>

相关文章

精彩推荐