ASP读取EXCEL所有工作表名称
<%Set adox = CreateObject("ADOX.Catalog")
Set conn = CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& sExcelFilePath &";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
adox.activeConnection = conn
for each table in adox.tables
if table.type="TABLE" then
%>
<%=table.name %>
<%
end if
next
%>
发表评论