well, it's very very easy ;-)
Excel can read Html itself, so you just leave the JSP that creates the table
but you tell the browser that it's an Excel File instead of HTML.
put this at the top of your JSP:
<%@ page contentType="application/vnd.ms-excel" %>
of you could do it depending on an input parameter:
<%if ("excel".equals(request.getParameter("contentType"))){
response.setContentType("application/vnd.ms-excel");
}%>
Geert Van Damme
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Arnab Nandi
> Sent: dinsdag 8 mei 2001 9:53
> To: [EMAIL PROTECTED]
> Subject: How can an JSP/HTML table be converted to Excel spreadsheet?
>
>
> Hi,
> We need to convert a JSP/HTML table to an Excel spreadsheet? How can
> this be done? Any pointers will be helpful.
> Arnab Nandi
>
> ==================================================================
> =========
> 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://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
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://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets