All you all really need to do is make your URL have a .xls extension 
(which is pretty easy to accomplish via mappings and
servlet handlers), you'll also need to set the mimetype.  The issue is 
simply that IE uses the extension and not the mime type.
Netscape behaves correctly and uses the mimetype.   Additionally, some 
folks have been able to just pass a parameter at the
end myServlet?balbla=bla&useless=myFilename.xls, but I've not tried that 
method personally.  I've done the other many times and I can confirm it 
does work on IE with Excel.

If someone wishes to patch the faq and include an example I shall apply 
the patches.

-Andy

[EMAIL PROTECTED] wrote:

>When the right way to do it won't work....
>
>I was originally writing the xls to the servlet response stream. This proved
>to be
>wildly inconsistent across different browsers. IE even exhibited a few
>different
>behaviors (depending upon whether Excel was already open on the
>desktop,etc...)
>I ended up writing the bytes to a temp .xls file on the server and
>redirecting
>to that. In IE the xls opens up in the browser. It's a bit  more overhead to
>do the IO
>obviously but it works consistently from a user standpoint  - and that's all
>my user's
>care about ;)
>
>You need a background thread to remove the temp files after a period of time
>also.
>
>-Chris
>
>
>
>
>
>Eric Pugh <[EMAIL PROTECTED]> on 06/05/2002 03:00:55 PM
>
>Please respond to POI Users List <[EMAIL PROTECTED]>
>
>To:   'POI Users List' <[EMAIL PROTECTED]>
>cc:
>Subject:  RE: Open an EXCEL file from IE
>
>
>
>I would love to see that as well..  I am having the same issue, I have to
>have the user rightclick the link and save to the desktop..  If there was a
>contrib directory, this type of servlet might be a good addition.
>
>Eric
>
>-----Original Message-----
>From: news [mailto:[EMAIL PROTECTED]]On Behalf Of anders
>Sent: Wednesday, June 05, 2002 2:56 PM
>To: [EMAIL PROTECTED]
>Subject: Open an EXCEL file from IE
>
>
>I tried the suggestion in "HSSF: Can workbooks come up from IE?".
>
>I used a servlet to send an excel file to the client, But it does not work!
>
>Could somebody post an example?
>
>
>Thank you!
>
>Anders
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
>  
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to