|
| |
|
|
wizard_oz
Posts: 140 Joined: 9/3/2004 From: Ga,USA Status: offline
|
Import form Excel - 2/22/2006 5:23:30
Hi, I have an Excel sheet and I would like show the data on my web page, I coonected the Excel to the ODBC, I have the code which is working for Access What Should I do to make it works for the excel? Thanks, Elen <%
dim conn,rs,sql
set conn=server.CreateObject("ADODB.recordset")
conn.Open "dsn=tester"
set rs=server.CreateObject("ADODB.recordset")
sql="select * from Sheet1"
rs.Open sql,conn
while not rs.EOF
Response.Write fname
rs.MoveNext
wend
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
|
|
|
|
rdouglass
Posts: 9229 From: Biddeford, ME USA Status: offline
|
RE: Import form Excel - 2/22/2006 9:32:58
With Excel files, I usually don't bother with a DSN but address it directly something like this: dim conn,rs,sql set conn=server.CreateObject("ADODB.recordset") conn.Open "DRIVER=Microsoft Excel Driver (*.xls); DBQ=" & Server.MapPath("/myFolder/mySpreadSheet.xls") set rs=conn.execute("select * from Sheet1") ....... That help any? ....
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|