tags:

views:

187

answers:

1

Hi,

I'm using the DisplayTag library (http://displaytag.sourceforge.net/) for tables in my JSP and I'm taking advantage of the export functionality that comes with it.

I want to export the table contents to an Excel file but I want to modify what is written out to the Excel file to include extra information and to change the format of the data.

Is it possible to specify a decorator to get this done?

Thanks!

+1  A: 

This is discussed in the documentation here. To use their example:

<display:table name="test" export="true">
    <display:setProperty name="decorator.media.html"  value="org.displaytag.sample.decorators.HtmlTotalWrapper" />
    <display:setProperty name="decorator.media.excel" value="org.displaytag.sample.decorators.HssfTotalWrapper" />
</display:table>
skaffman