You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by swapnilpatil <pa...@gmail.com> on 2008/01/07 06:46:47 UTC

Tapestry Contrib Table to MS-Excel

I have one tapestry page in which i am using Tapestry's Contrib Table which
contains some data. Now i want to export this table/data to MS-Excel file
using a button.

How to do this pls help me by sending a code for the same.
-- 
View this message in context: http://www.nabble.com/Tapestry-Contrib-Table-to-MS-Excel-tp14659255p14659255.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry Contrib Table to MS-Excel

Posted by Christian Köberl POI <ch...@porsche.co.at>.

swapnilpatil wrote:
> 
> I have one tapestry page in which i am using Tapestry's Contrib Table
> which contains some data. Now i want to export this table/data to MS-Excel
> file using a button.
> 
The easy way to accomplish this is to simply send the HTML table and set the
content type to "application/vnd.ms-excel". 
You could do this with something like this:
  response.setContentType("application/vnd.ms-excel");
 
response.setHeader("Content-disposition","attachment;filename=MyFileName.xls");
See: http://www.devtrain.de/artikel_912.aspx (German)

The more complex way is to use Apache POI (http://poi.apache.org/) - here
you have to build the Excel table via POI API and you cannot use the
Tapestry table at all (maybe you can write a special render logic for the
Tapestry table and use it anyway).

Cheers,
Chris
-- 
View this message in context: http://www.nabble.com/Tapestry-Contrib-Table-to-MS-Excel-tp14659255p14660404.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org