navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Import form Excel

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Import form Excel
Page: [1]
 
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.

(in reply to wizard_oz)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Import form Excel
Page: [1]
Jump to: 1





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