一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

如何直接调用Excel数据?

时间:2022-06-30 10:16:32 编辑:袖梨 来源:一聚教程网

<%@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
%>

热门栏目