Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > PC based Database Applications > Microsoft Excel > reading data from excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-14-08, 05:25
Ugene- Ugene- is offline
Registered User
 
Join Date: Sep 2008
Posts: 13
Exclamation reading data from excel

Any 1 here konw how to retrieve the data from excel to and then display it out on internet browser using ASP ?any know konw how to set the connection strings excel with ASP ?
Reply With Quote
  #2 (permalink)  
Old 09-18-08, 06:46
Ugene- Ugene- is offline
Registered User
 
Join Date: Sep 2008
Posts: 13
Any 1 whom have done excel with asp help me pls..
i currently have these codes
--------------------------------------------------------------------------
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">

<%@ Language=VBScript %>
<%
' Set Connection Params
Set oConn = Server.CreateObject("ADODB.connection")
oConn.Open "Driver={Microsoft Excel Driver (*.xls)}; DriverId=790;" &_
"DBQ=C:\Inetpub\wwwroot\InfoWeb\14Apr08_NUS_hr_Dat a.xls;" &_
"DefaultDir = C:\Inetpub\wwwroot\InfoWeb\"

Set RS=Server.CreateObject("ADODB.recordset")

' Write the SQL Query
RS.open "SELECT * FROM my_range", oConn


do until RS.EOF
Response.Write ( RS("Item No") & " -- " & RS("Item Description") & "<br>")
RS.movenext
Loop

'Close the recordset/connection

RS.Close
oConn.Close
Set RS = Nothing
%>




<html>
<head>
<title>Pressure Chart</title>
</head>
<body>


<applet codebase="new" code="linegraph.class" height=220 width=360>
<param name="title" value="Sales">
<param name="NumberOfVals" value="<%=sqlQuery.RecordCount%>">
<param name="NumberOfLabs" value="<%=sqlQuery.RecordCount%>">
<PARAM NAME=ymax VALUE=<%=(Fix(sqlQuery("M")/10000)+1)*10000%>>
<PARAM NAME=ymin VALUE=0>
<PARAM NAME=mode VALUE=0>
<PARAM NAME=border VALUE="20"> <PARAM NAME=Grid VALUE="true">
<PARAM NAME=LineColor_R_L1 VALUE=53>
<PARAM NAME=LineColor_G_L1 VALUE=153>
<PARAM NAME=LineColor_B_L1 VALUE=51>
<%
i = 1
while (not sqlQuery.EOF) %>
<param name="VAL<%=i%>_L1" value="<%=sqlQuery("SalesTotal")%>">
<param name="LAB<%=i%>" value="<%=MonthName(Month(sqlQuery("Date")))%>">
<%
i = i + 1
sqlQuery.MoveNext
wend %>

</APPLET><p>

</body>
</html>
--------------------------------------------------------------------------
So how do i set my range which i underline? there are error in the codes could you point out to me ?

this is the error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

[Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'my_range'. Make sure the object exists and that you spell its name and the path name correctly.

/Infoweb/pressure.asp, line 15
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On