correction: I got it working by adding the following line in my generator: response.setHeader("Content-Disposition", "inline; filename=output.xls"); ..but having to hard-code a parameter name in my generator as well as my sitemap leads to a potential consistency problem.
Any better ideas? TIA Chris -=-=- -----Original Message----- From: Shaw, Chris Sent: 11 April 2002 14:23 To: '[EMAIL PROTECTED]' Subject: Excel needs filename? Hi, I'm using the HSSFSerializer to generate an M$-Excel file.... The mime-type is set to: application/vnd.ms-excel When I use Netscape it works perfectly.... But when I use IE it doesn't recognise the mime-type - it instead tries to look at the filename....and the filename is basically junk. I searched the archives and found that I could use perhaps overcomes this by adding the following: response.setHeader("Content-Disposition", "inline; filename=output"); or: response.setHeader("Content-Disposition", "attachment; filename=output.xls"); (though the 2nd option doesn't work for me). However, I'm using my own generator to generate XML.....always XML.....and then I have an if statement in my sitemap to choose a different transfomer&serializer (HTML, PDF, Excel etc....) based upon an input parameter. My fallback solution is to also test for this parameter inside my generator and, if Excel was chosen, add this line as above. But this is a m-ugly solution....and not as easily maintainable.... What I can't understand is that my fo2pdf serializer doesn't have the same problem...this works 100% whether in IE or Netscape. I saw references in the mailing list archives about a link http://xml.apache.org/cocoon/faqs.html#faq-iepdfbug but the actual reference in question does not appear on this page (anymore).... Does anyone have any more info and/or a better solution to the problem? TIA Chris ~~~~~~~~~~~~~~~~~~~~ Chris Shaw > European Central Bank > DG Information Systems > * +49 (0) 69 1344 7764 > * [EMAIL PROTECTED] ~~~~~~~~~~~~~~~~~~~~ Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> Any e-mail message from the European Central Bank (ECB) is sent in good faith but shall neither be binding nor construed as constituting a commitment by the ECB except where provided for in a written agreement. This e-mail is intended only for the use of the recipient(s) named above. Any unauthorised disclosure, use or dissemination, either in whole or in part, is prohibited. If you have received this e-mail in error, please notify the sender immediately via e-mail and delete this e-mail from your system. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>