Classic ASP to EXCEL

Hi,

I am trying to save an Excel file that generated by ASP to a folder.  This is what I use
  Response.AddHeader "Content-Disposition", "attachment; filename=" & "C:\inetpub\wwwroot\EXCELReports\testReport.xls"'

But it keeps going to the default download folder. Any ideas?  thanks
mcrmgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gplanaCommented:
The "attachment; filename" http header parameter is supposed to assign a name to the downloaded file. However, you can't specify a path, as you can no suppose which paths would PC client have. In fact, client could be even a PC running linux (where C: unit concept doesn't exists) or client could be even another kind of device (for example an Android tabled, etc...).

So it is the browser with the help of the operating system who determines the path where downloaded files should go, not your server engine (ASP in this case).

Hope this helps. Regards.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mcrmgAuthor Commented:
I see. Thanks for the quick reply.  Is there other options to state the path?  thanks
0
gplanaCommented:
I don't think so, because it's the client responsability, not the server. For me it's no logical to force a path from the server. What if you force a Windows path and user is connecting from a linux machine?
0
gplanaCommented:
However, if your application is run just on some PCs, maybe you can consider to configure the web-browsers on that PCs in order to store downloaded files on a specific folder, different than the tipical download folder.

But if you choose this approach, you may ensure that users are using the browser you are configuring (maybe you are configuring IE and some users uses Firefox).

Regards.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.