How to call EXCEL data directly?

xiaoxiao2021-03-06  76

<% @ language = VBScript%>

<%

SET EXLAPP = Server.createObject ("Excel.Application")

strsource = "E: /EXCEL/SAMPLE.XLS"

'Database location

SET EXLSTOCK = exlapp.workstocks.open (strsource)

SET EXLSHEET = EXLSTOCK.WORKSHEETS (1)

i = 1

Response.write "

"

While EXLSHEET.CELLS (I, 1) <> ""

Response.write "

"

Response.write "

" & xlsheet.cells (i, 1) & ""

Response.write "

" & xlsheet.cells (i, 2) & ""

Response.write "

" & xlsheet.cells (i, 3) & ""

Response.write ""

i = i 1

Wend

Response.write ""

Set Xlsheet = Nothing

Set XLstock = Nothing

XLapp.quit

%>

转载请注明原文地址:https://www.9cbs.com/read-94440.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.040, SQL: 9