|
-
Aug 29th, 2003, 09:41 PM
#1
Thread Starter
Addicted Member
ASP with excel
Hi everybody
how can i insert the contents from an excel sheet to an asp page.
can some one help me pls
thanks
-
Aug 30th, 2003, 10:13 AM
#2
Addicted Member
this is the code in excel to read a comment. Does this help
scomment = wks.Range("targetrange").Comment.Text
-
Aug 30th, 2003, 08:47 PM
#3
Thread Starter
Addicted Member
ASP and excel
Hi
i am not getting with it i have never tried it before could u pls help me with the full code.
thanks
-
Aug 30th, 2003, 09:16 PM
#4
Addicted Member
sorry i sent this to the wrong post my isp keeps going down and somehow I sent it to this thread
anyhow in looking at your question I dont understand what it is tou are tring to do
can you explain are you wanting to display and excell sheet in html thru asp?
-
Aug 30th, 2003, 09:18 PM
#5
Addicted Member
I sent answer to wrong post sorry
are you trying to show a worksheet in html or something?
-
Aug 31st, 2003, 04:54 AM
#6
Thread Starter
Addicted Member
ASP and excel
ya, i want to display the excel sheet into an ASP page
how can i do that can u help me with the code please its very urgent
-
Aug 31st, 2003, 11:29 AM
#7
Addicted Member
we need more detail
excel can be saved as a web page
then you just use the html
if tou want to remote contol excel thats different
if you want to get some or the cells and place in a table that would be another procedure
...
see what I mean
-
Sep 1st, 2003, 10:08 PM
#8
Thread Starter
Addicted Member
ASP and excel
HI
I have an excel book with 3 work sheets the last sheet named as " Total " has the data which i want to put on an asp page.
There are around 250 to 300 rows and around 10 to 12 colums in that sheet.
That Total sheet contains data of all the clients. I want to display the data of one perticular client only. which will be in a row format and not in a tabular format with alternate colors for the row.
I would like to have a text box on top with a search button where in i can search a perticular record also or can scroll the asp page also.
I want this page to be on the server so that all my client machines can access the ASP page and get the required information.
There a new excel sheet on a daily bases i:e there are new records on daily bases and so the ASP page should have the news information on it .
This is my problem can u pls give me a sloution for the same.
with the code pls.
-
Sep 2nd, 2003, 11:36 AM
#9
Addicted Member
you said:
I want to display the data of one perticular client only. which will be in a row format and not in a tabular format with alternate colors for the row.
I would like to have a text box on top with a search button where in i can search a perticular record also or can scroll the asp page also.
does this mean from excel you want one perticul client to display on asp page
or
on asp page you want to select a customer and ahow just that data
also do you want the precess to be a button in excel or do you want another process to do this parsing
-
Sep 2nd, 2003, 10:17 PM
#10
Thread Starter
Addicted Member
ASP with excel
hi
ya i want to get the data of a perticular client from excel and put it on the page.
and then on the page when i type something to search for that perticular client i should get the search result and only that perticular record should be displayed.
i want the button on the same page on top of all the records but the result should be displayed on another page and after clicking " BACK " on that page it should come to the original page.
what i was thinking is:-
To take the data from the excel sheet of a perticular client and display it on the page as well as store it into an array so that when i search for a perticular record i can get it easily from the array and i need not go to the excel sheet again to search a perticular record due to which i can reduce the load on the server by accessing the sheet again and again but if there is any more latest information added to the excel sheet then the page should have all the information or records on it
so can u pls help me.
Last edited by amit_m04; Sep 2nd, 2003 at 10:23 PM.
-
Sep 3rd, 2003, 05:45 PM
#11
Addicted Member
i would read the excel data into a data base and the build an asp page to read from that database
do you have an iis server to show the asp pages?
are you a programmer
do you need help to do all of it or just snippets?
-
Sep 3rd, 2003, 08:06 PM
#12
Thread Starter
Addicted Member
ASP with excel
Hi
i have just started programming, i have an IIS server and also a PWS.
I dont want to put the data from the excel sheet into the database.
cant we do it directly from the excel sheet. to the pge that we want to display.
i would like to have a full coding about the same and not the snippet
-
Sep 3rd, 2003, 09:43 PM
#13
Addicted Member
help samples
place this code in an asp page
my servers do not have the ability to debug this unfortunately so youre on youor own
it worked when i pointed it to access
i didnt place a text box but you want to do something dont you

i am available if you need help
or find someone else who can actually run ado toi excel on their servers
Code:
<%
Option Explicit
on error resume next
'I cant debug this as I dont have excel ability on my servers
'you need the filename and in that file you need to make a named range of the data
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DBQ=" & Server.MapPath("xl_data.xls") & ";" & _
"DRIVER={Microsoft Excel Driver (*.xls)};"
'i found documentation there
'also asp101.com samples have an excel sample
Dim sql,rsCo,uid,coname,i,k
k=99
%>
<%
coname = Request.querystring("cname")
if len(coname)=0 then
'customers being the named range
SQL = "select * from customers"
else
SQL = "select * from customers where coname like '" & coname & "%'"
end if
Set rsCo = Server.CreateObject("ADODB.Recordset")
rsCo.Open sql, conn, 3, 3
%>
<html>
<head>
<title>Customers</title>
</head>
<body bgcolor=Silver link="#DD0000" vlink="#DD0000" alink="#000000">
<font face="arial,helvetica" size="2">
<h3><% =coname%></h3>
<%if not rsCo.EOF then%>
<table cellpadding="2" cellspacing="0" border="1" bordercolor="#B4B4B4" width="100%">
<tr bgcolor=MidnightBlue><font face="arial,helvetica" size="2" color=White>
<%for i=0 to rsCo.Fields.count-1 %>
<th ><font face="arial,helvetica" size="2" color=White><%=rsCo.Fields(i).Name %></th>
<% next %>
<th><font face="arial,helvetica" size="2" color=White>View Details</th></font>
</tr>
<%
rsCo.Movefirst
do until rsCo.EOF
if k=99 then
k=1
%>
<tr bgcolor=yellow>
<%
else
k=99
%>
<tr bgcolor=lightblue>
<%
end if
for i=0 to rsCo.Fields.Count-1 %>
<td><font face="arial,helvetica" size="2">
<%=rsCo.Fields(i).value %></font></td>
<%next%>
<td>
<a href =xlcid.asp?cname=<%=rsCo("coname").Value %>>view Details</a>
</td>
</tr>
<%rsCo.Movenext
loop%>
</table>
<hr>
<a href=xlcid.asp>Show All Records</a>
<%else%>
<p><b>Sorry, there is no data.</b></p>
<%end if%>
<%
rsCo.close
set rsCo = nothing
conn.close
set conn = nothing
%>
</body>
</html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|