|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 />
|
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Extract data from Excel and display onto the web |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|