473,467 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Open Excel File with ASP

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!

Mar 27 '06 #1
8 2056

jnb0...@unt.edu wrote:
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 :-))

--
Mike Brind

Mar 27 '06 #2
It will be like tiq20060301.xls tiq20060302.xls tiq20060303.xls etc

Mar 27 '06 #3

jnb0...@unt.edu wrote:
It will be like tiq20060301.xls tiq20060302.xls tiq20060303.xls etc


strfFileName = "tiq" & Request.Form(Year") & Request.Form("Month") &
Request.Form("Day") & ".xls"

--
Mike Brind

Mar 27 '06 #4
What do I type to open strFileName?

Mar 27 '06 #5
>>> It will be like tiq20060301.xls tiq20060302.xls tiq20060303.xls etc
strfFileName = "tiq" & Request.Form(Year") & Request.Form("Month") &
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".

Mar 27 '06 #6
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)

%>

Mar 27 '06 #7
Nevermind...it had to do with my form not my asp code. Sorry to
trouble you, already had the answer I needed.

Mar 27 '06 #8

Larry Bud wrote:
It will be like tiq20060301.xls tiq20060302.xls tiq20060303.xls etc
strfFileName = "tiq" & Request.Form(Year") & Request.Form("Month") &

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".


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

--
Mike Brind

Mar 27 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
1
by: Lize | last post by:
Hi, I'm writing an ASP application to open an excel workbook, then run a macro stored in the excel file, which produces outputs that will be displayed back onto my ASP application. Now the...
1
by: Sarah | last post by:
Hello. I am using Microsoft.Office.Interop.Excel in a C# .NET project. I want to open an Excel application with a specific file name. I am currently opening it with this code: ...
2
by: zino | last post by:
I have a file that is created in Excel and saved as an htm file. (if I open the file through Excel it open as Excel file, if I click on the file name it open in internet explorer). I need to...
3
by: VbUser25 | last post by:
hi.. i have a form i accept some user inputs in the form. there is a link on the form from where i open the excel file in the same browser (not in a new page...simply using a href. i am also...
3
by: Jennyfer Barco | last post by:
Hello, I have a question, how can I open Microsoft Excel from .NET. I only need to open a new file in Excel and paste some information and set the Microsoft Excel as the enabled aplication, so the...
4
by: JaxDawg | last post by:
I have a spreadsheet saved as an XML spreadsheet so I can manipulate it easier (and don't need COM). When I'm done, I want to display to the user. Currently, I'm using simple JavaScript in my PHP...
8
by: shenkel55 | last post by:
I'm using Access and Excel 2003. Using either the import wizard or code, I have the same problem. This problem only happens with Excel files automatically generated by Corp IT. If I try to do an...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.