Re: IE open excel file directly but not save as

2011-09-26 Thread Chris Pratt
appreciate if there is any solution. > > Regards, > Rakesh > > > > > -Original Message- > From: Emi Lu [mailto:em...@encs.concordia.ca] > Sent: Tuesday, September 27, 2011 12:34 AM > To: user@struts.apache.org > Subject: Re: IE open excel file directly but not s

RE: IE open excel file directly but not save as

2011-09-26 Thread Rakeshkumar Parmar
...@encs.concordia.ca] Sent: Tuesday, September 27, 2011 12:34 AM To: user@struts.apache.org Subject: Re: IE open excel file directly but not save as All right, after so many testing with diff IE versions, here comes the trick: res.setHeader("Content-Disposition", "attachment;filename

Re: IE open excel file directly but not save as

2011-09-26 Thread Emi Lu
All right, after so many testing with diff IE versions, here comes the trick: res.setHeader("Content-Disposition", "attachment;filename=\""+ "test.xls" + "\";"); inline -> attachment. Emi On 09/26/2011 02:05 PM, Emi Lu wrote: Hi Chris, thanks a lot! I updated to : res.setHeader("Cache-

Re: IE open excel file directly but not save as

2011-09-26 Thread Emi Lu
Hi Chris, thanks a lot! I updated to : res.setHeader("Cache-Control", "private"); res.setHeader("Cache-Control", "private, must-revalidate"); res.setHeader("Pragma","private"); res.setContentType("application/vnd.ms-excel"); res.setHeader("Content-Disposition", "inline"); res.setContent

Re: IE open excel file directly but not save as

2011-09-26 Thread Chris Pratt
Try removing the filename from the Content-Disposition header. "inline" doesn't support this attribute and maybe IE is assuming you mean "external" because it's there. (*Chris*) On Mon, Sep 26, 2011 at 10:30 AM, Emi Lu wrote: > Hello , > > I know its not really struts question. But maybe some

IE open excel file directly but not save as

2011-09-26 Thread Emi Lu
Hello , I know its not really struts question. But maybe someone knows the answer. IE cannot open an excel file directly (IE8,9) res.reset(); res.setHeader("Cache-Control", "private, must-revalidate"); res.setHeader("Pragma","private"); res.setContentType("application/vnd.ms-excel"); res.s