Here's a snippet which will help:

try{
         response.setContentType("application/x-unknown-content-type-Excel.CSV;
charset=us-ascii");
         response.setHeader("Content-Transfer-Encoding", "7bit");
         response.setHeader("Content-disposition", "inline;
filename=\"defaultFileName.csv\"");
         out = Response.getWriter();
         out.println(whatever..);

 }
 catch(Exception e){
     System.out.println("In resultsExcel.jsp: " + e);
 }

Geeta

Giovanni Santini SZ3PGQ wrote:

> Hello World,
>
> is there somebody who can give me an example of servlet to generate excel
> file?
> Thank you
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to