struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emi Lu <>
Subject IE open excel file directly but not save as
Date Mon, 26 Sep 2011 17:30:26 GMT
Hello ,

I know its not really struts question. But maybe someone knows the answer.

IE cannot open an excel file directly (IE8,9)

  res.setHeader("Cache-Control", "private, must-revalidate");
  res.setHeader("Content-Disposition", "inline;filename=\""+ "fn.xls" + 
  res.setHeader("Content-Transfer-Encoding", "binary");

If I save as a file, open it, excel shows:

  "Office File Validation detected a problem while trying to open this 
file. Opening it may be dangerous"

Then I have to click "open" to open it.

Does someone know how to open excel file directly but not have to save 
as under IE please?

thanks a lot!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message