You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ss...@worldbank.org on 2004/02/04 10:06:48 UTC
How to export the html table contents (records) to an Excel file.
Hi,
I have webpage (.jsp) which lists out 4 to 5 records (having say 4 to 5 columns)
inside html table tag. This page, has an "Export" button, at the bottom. On
click of this button, I need to export the records (that the current page is
displaying) to an .xls (Excel format) file.
Shall be greatful if anyone can tip me on this.
Thanks,
S.Srikanth
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: How to export the html table contents (records) to an Excel file.
Posted by James Mitchell <jm...@apache.org>.
response.setContentType("application/vnd.ms-excel");
Assuming the end user has Excel installed and their browser
accepts "application/vnd.ms-excel", the data will be streamed
to the client and the content will be opened by Excel.
--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (cell)
AIM: jmitchtx
MSN: jmitchell@apache.org
----- Original Message -----
From: <ss...@worldbank.org>
To: <St...@Jakarta.Apache.Org>
Sent: Wednesday, February 04, 2004 4:06 AM
Subject: How to export the html table contents (records) to an Excel file.
> Hi,
>
> I have webpage (.jsp) which lists out 4 to 5 records (having say 4 to 5
columns)
> inside html table tag. This page, has an "Export" button, at the bottom.
On
> click of this button, I need to export the records (that the current page
is
> displaying) to an .xls (Excel format) file.
>
> Shall be greatful if anyone can tip me on this.
>
> Thanks,
> S.Srikanth
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: How to export the html table contents (records) to an Excel file.
Posted by Janarthan Sathiamurthy <ja...@yahoo.com>.
Hi,
The following link is a very good solution -
http://jakarta.apache.org/poi/hssf/index.html
Regards,
Janarthan S
ssrinivasrao@worldbank.org wrote:
Hi,
I have webpage (.jsp) which lists out 4 to 5 records (having say 4 to 5 columns)
inside html table tag. This page, has an "Export" button, at the bottom. On
click of this button, I need to export the records (that the current page is
displaying) to an .xls (Excel format) file.
Shall be greatful if anyone can tip me on this.
Thanks,
S.Srikanth
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
RE: How to export the html table contents (records) to an Excel file.
Posted by Andrew Peck <an...@ngv.vic.gov.au>.
You could try the displaytag tag library on sourcefourge:
http://displaytag.sourceforge.net. It includes nice table export
functionality for excel, csv and xml.
Regards,
Andy Peck
> -----Original Message-----
> From:
> struts-user-return-105256-andrew.peck=ngv.vic.gov.au@jakarta.a
> pache.org
> [mailto:struts-user-return-105256-andrew.peck=ngv.vic.gov.au@j
> akarta.apa
> che.org]On Behalf Of ssrinivasrao@worldbank.org
> Sent: Wednesday, 4 February 2004 8:07 PM
> To: Struts-User@Jakarta.Apache.Org
> Subject: How to export the html table contents (records) to an Excel
> file.
>
>
> Hi,
>
> I have webpage (.jsp) which lists out 4 to 5 records (having
> say 4 to 5 columns)
> inside html table tag. This page, has an "Export" button, at
> the bottom. On
> click of this button, I need to export the records (that the
> current page is
> displaying) to an .xls (Excel format) file.
>
> Shall be greatful if anyone can tip me on this.
>
> Thanks,
> S.Srikanth
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org