To Tiana Zhang:
you can use ALL the table formatting tags available in HTML. Excel will
build the spreadsheet according to your HTML layout.
-----Original Message-----
From: Akshaykumar Sharma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 12:10 PM
To: [EMAIL PROTECTED]
Subject: Re: [SERVLET-INTEREST] Urgent!! Export Servlet result to Excel
in delimited format
use \t for tab
and \n for newline
regards
Akshay
-----Original Message-----
From: Prasad M Gowda [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 25, 2000 8:10 PM
To: [EMAIL PROTECTED]
Subject: Re: Urgent!! Export Servlet result to Excel in delimited format
Use "\t" tab character as each column separator and "\0" as row separator.
> -----Original Message-----
> From: Tiana Zhang [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, October 25, 2000 9:12 AM
> To: [EMAIL PROTECTED]
> Subject: Urgent!! Export Servlet result to Excel in delimited format
>
> Hi all,
> Sorry I bring up this question again. I didn't find the exactly answer
> from the
> archive.
>
> I have a servlet that retrieve result from the database. I want to export
> the
> result to Excel.
> Here is my partial code:
>
> response.setContentType("application/cnd.ms-excel");
> pw.println("<PRE>");
> response.setHeader( "Content-disposition",
> "attachment;filename=file.xls");
> pw.println("</PRE>");
>
> This code works fine in terms of launching the Excel sheet. But the
> problem I
> have is that
> all the results appear in the first cell on each row, rather that one item
> per
> cell. I tried comma, tab to delimited each data but failed. Can any one
> help?
>
> Thanks a lot.
> Tiana
>
> __________________________________________________________________________
> _
> 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
___________________________________________________________________________
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