Open Excel File with ASP

J

jnb0012

I am creating a webpage and have a form where a visitor will choose a
day, month, and year. I want to pass the data from the form into an
asp page which will process it and put it into a string and open the
excel file requested. The excel file to open will depend on the day,
month, and year chosen in the form. Please help me figure out the
coding for the asp page to open this file.

Thanks!
 
M

Mike Brind

I am creating a webpage and have a form where a visitor will choose a
day, month, and year. I want to pass the data from the form into an
asp page which will process it and put it into a string and open the
excel file requested. The excel file to open will depend on the day,
month, and year chosen in the form. Please help me figure out the
coding for the asp page to open this file.

Thanks!

Give an example file name. What format is the date in? 270306.xls?
032706.xls? 03272006.xls? 32706.xls? (and loads of others.... I could
go on all night :))
 
L

Larry Bud

It will be like tiq20060301.xls tiq20060302.xls tiq20060303.xls etc
Request.Form("Day") & ".xls"
What do I type to open strFileName?

C'mon, you've got to put some effort forth in learning ASP.

You could just display the link to the file which the user would have
to click, or do a response.redirect to the excel file.

If you're unable to figure out how to do either of those, I suggest
getting an ASP book. I personally learned from a book called "ASP
Unleashed".
 
J

jnb0012

I was just making sure I had the code right cause I couldn't get it to
work. I already had the following and figured I must be completely
wrong...

<%
strfile = "tiq" & Request.Form("year") & Request.Form("month") &
Request.Form("day") & ".xls"

Response.Redirect("http://www.sitename.com/reports/" & strfile)

%>
 
J

jnb0012

Nevermind...it had to do with my form not my asp code. Sorry to
trouble you, already had the answer I needed.
 
M

Mike Brind

Larry said:
C'mon, you've got to put some effort forth in learning ASP.

You could just display the link to the file which the user would have
to click, or do a response.redirect to the excel file.

If you're unable to figure out how to do either of those, I suggest
getting an ASP book. I personally learned from a book called "ASP
Unleashed".

Beginning ASP 3.0 (Wrox) and ASP Developer's Guide (McGraw Hill) are
good ones :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top