Hi Smita,
I had the same requirement, and I found 2 alternatives:
1) You can use XML to create your Excel file, if you are using the last
version of Excel (don't remember if Excel 200 supports it too)
or
2) You can create your table in HTML and make the browser open it with
Excel, as it can read HTML (this is what I did).
You can use
response.setContentType("application/vnd.ms-excel");
to tell the browser this file is an Excel file, most browser will let you
open directly with Excel. And
response.setHeader("Content-Disposition",
"attachment;filename=myfile.xls;");
to name the resulting file as an *.xls file, so if the user decides to save
it, it will be saved with that extension.
It works perfectly...
Good luck!
Luis Javier
----- Original Message -----
From: "Smita Kotnis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 10:08 PM
Subject: Re: Generation Of Excel File From JSP
> Hi,
> Thanks for reply. But can you tell me how to do that??
>
> Smita
> Sandy <[EMAIL PROTECTED]>:
>
> > u can use a combination of client side Scrpt (VB
> > Script) together with JSP to do that.
> >
> >
> > --- Smita Kotnis <[EMAIL PROTECTED]> wrote:
> > > Hi All,
> > > In my application I have a requirement of
> > > creating an excel file from a JSP page. The data
> > > would be in a couple of vectors and based on those
> > > values multi columned excel sheet is to be
> > > generated. How to do this?? any suggestions? Thanks
> > > in anticipation.
> > >
> > > Regards
> > > Smita
> > > -------------------------------------------------
> > > This mail helped a tree grow. Know more at
> > > http://green.sify.com
> > >
> > > Take the shortest route to success!
> > > Click here to know how http://education.sify.com
> > >
> > >
> >
===========================================================================
> > > 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
> >
> >
> > =====
> > luv,
> > sandy
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
> >
> >
===========================================================================
> > 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
> >
> >
>
> -------------------------------------------------
> This mail helped a tree grow. Know more at http://green.sify.com
>
> Take the shortest route to success!
> Click here to know how http://education.sify.com
>
>
===========================================================================
> 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
===========================================================================
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