try using
response.setContentType("application/vnd.ms-excel");

Thanks,
Davindar S Gill


> -----Original Message-----
> From: rajac [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, January 14, 2002 7:47 PM
> To:   [EMAIL PROTECTED]
> Subject:      Problem while writing the response to an Excel file
>
> Hi,
>    I am writting the response of a servlet/jsp page to an Excel file. I am
> setting the response.setContentType("text/xls"); But the output is written
> to a text file in plain text format.
>
>    How to write the response to an excel file.
>
> Actually my application is like this. I am having an JSP page, where i
> have an "download Result" link. By clicking on the link, the results can
> either be saved on to the hard disk as an Excel file or can be displayed
> on the same window by opening an excel sheet. Your help will really be
> appreciated.
> Thanks,
>
> Regards,
> Raja
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to