opening excel file in ASP.net 2.0

  • Thread starter Thread starter nagen
  • Start date Start date
N

nagen

i have an excel file stored in C:\Test.xls(server driver)
i would like my web application to allow this file to be opened by the
client by prompting the save as dialog..how can i do this in C#
 
Hello nagen,

Create attach and allow user to download it. What's the problem?

Smth like that
Response.Clear();
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition","attachment;filename=Test.xls");
Response.WriteFile("myfile.xls");

n> i have an excel file stored in C:\Test.xls(server driver)
n> i would like my web application to allow this file to be opened by
n> the
n> client by prompting the save as dialog..how can i do this in C#
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Hi Nagen,

isn't enough to embed the excel file by declaring the mime type in the
html document?

Regards,
Fernando.

"A polar bear is a bear whose coordinates has been changed in terms of
sine and cosine"
 

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

Back
Top