SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 1st, 2000, 07:25 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Extract data from Excel and display onto the web

<i><b>Originally posted by : cassandra (limbeehar77@yahoo.com)</b></i><br />I need to extract the data from Excel file and display it onto the web. Pls provide me with codes if possible coz i am new in this field thanks..<br />

Reply With Quote
  #2  
Old June 15th, 2004, 10:17 AM
sanjanah_verma sanjanah_verma is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 190 sanjanah_verma User rank is Corporal (100 - 500 Reputation Level)sanjanah_verma User rank is Corporal (100 - 500 Reputation Level)sanjanah_verma User rank is Corporal (100 - 500 Reputation Level)sanjanah_verma User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 7 h 16 m 13 sec
Reputation Power: 6
Extract data from Excel and display onto the web

Hi,
I have done a similar one that you had asked for.I'm posting it here.Hope this gives you some idea.

<html>
<body>
<%
strSQL = "SELECT * FROM Sheet;"
strConn = "DRIVER=Microsoft Excel Driver (*.xls);DBQ=" & Server.MapPath("filename.xls")
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConn
Set objRS = objConn.Execute(strSQL)
Response.Write "<table border=""1"" cellpadding=""5""><tr>"
For i = 0 to (objRS.Fields.Count-1)
Response.Write "<th>" & objRS.Fields(i).Name & "</th>"
Next
Response.Write "</tr>"
While NOT objRS.EOF
Response.Write "<tr>"
For i = 0 to (objRS.Fields.Count-1)
Response.Write "<td>" & objRS.Fields(i).Value & "</td>"
Next
Response.Write "</tr>"
objRS.MoveNext
Wend
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
Response.Write "</table>"
%>
</body>
</html>

Regards,

Sanjanah

Last edited by sanjanah_verma : June 15th, 2004 at 10:19 AM. Reason: Wrong Title

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Extract data from Excel and display onto the web


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT