I am working on a Struts application and creating a table with display tag library by using display:table and display:column tags.
I have added html in some columns so when I export the table html code also exported in Excel sheet. So I got a work around for this. I want to create hidden columns without using html code in them and export these columns instead of columns which contain html data.
But I stuck at hiding columns and exporting hidden column and prevent some columns to exported in Excel sheet.
You can hide columns by using css classes and then Export all columns, and add media="html"
for columns which you want not to export.
Give me some time I will revert you with exact code.
Bellow is the exact code what you should do for complete your task :-
headerClass="export-wthtml" class="export-wthtml"
in your display:column
tag for hide that column from view but keep in export..export-wthtml{display: none;}
media="html"
for columns which you want to show in view but not want to Export.export="true"
in display:table
tag to add export functionality to table.<display:setProperty name="export.excel.filename" value="xxx.xls"/>
under display:table
to give a name to Exported Excel sheet.Hope your all queries are solved now!
Thanks.