Hi,
 
the book 'core Servlets and JavaServerPages' covers your topic. There is a free download at www.javalobby.org You simply have to register for free. In the German edition your problem is described in chapter 11.2.2.
I haven't tested it yet, but it is simple:
 
response.setContentType("application/vnd.ms-excel");
// note that there are tabs, no spaces between the columns !
1997    1998    1999    2000    2001 (Anticipated)
12.3    13.4    14.5    15.6    16.7
 
There some hints in the book, so try it out.
 
Hope to help you.
Christian
 
 -----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of bill tao
Sent: Monday, April 15, 2002 6:44 PM
To: [EMAIL PROTECTED]
Subject: output xls file through servlet

Hi, everyone,

I have one question. i am writing a servlet program to output some images which are done by microsoft excel . my idea is i store the url of these images in mysql table. and i wrote an application showplot to retrieve the address and show these plot thought html.

does anybody know how to output the xls file(excel). i know how to output gif and jpg file but not xls file.

any suggestion will be really appreciated.

bin



Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

Reply via email to