Open Excel files outside of Internet Explorer  
Author Message
mattdaddym





PostPosted: Fri Feb 06 07:12:55 CST 2004 Top

ASP.Net >> Open Excel files outside of Internet Explorer Hi

I'm rendering my datagrid to a HTML stream with a .xls extension to open in Excel however it opens in the browser. Is there a way to programatically force it to open Excel? I know you can configure a setting in windows explorer to do this but i want to do this without any client interaction

Thanks

Web Programming93  
 
 
Ken





PostPosted: Fri Feb 06 07:12:55 CST 2004 Top

ASP.Net >> Open Excel files outside of Internet Explorer Are you sending the content as an attachment with a name? That seems to work
for me... it launches Excel.

"Neil" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Hi,
>
> I'm rendering my datagrid to a HTML stream with a .xls extension to open
> in Excel however it opens in the browser. Is there a way to
> programatically force it to open Excel? I know you can configure a setting
> in windows explorer to do this but i want to do this without any client
> interaction.
>
> Thanks

 
 
Steve





PostPosted: Fri Feb 06 16:25:32 CST 2004 Top

ASP.Net >> Open Excel files outside of Internet Explorer Some code like this should do the trick.
Response.AddHeader("Content-Disposition","attachment;filename=myfile.xls");

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net



"Neil" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
> Hi,
>
> I'm rendering my datagrid to a HTML stream with a .xls extension to open
in Excel however it opens in the browser. Is there a way to programatically
force it to open Excel? I know you can configure a setting in windows
explorer to do this but i want to do this without any client interaction.
>
> Thanks