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"
 
Back
Top