aspose file tools*
The moose likes Other Open Source Projects and the fly likes Display Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Display Tag" Watch "Display Tag" New topic
Author

Display Tag

Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
My requirement is to export the report in excel. I am using display tag with struts for this. Everything is running, the report is getting displayed with proper columns and paging and export option is also working good. Now what i want is to use only export option i do not want to display data i just want an export option, i am unable to do this.

My code looks like this




Sorry if i am posting my query in wrong forum, as i using it with struts so i am posting it here





Regards & Thanks
Bilal


Regards
Bilal
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
According to http://displaytag.sourceforge.net/1.2/tut_style.html, any style and class attributes assigned to the <display:table> tag will be reflected in the generated HTML. That -in conjunction with the "thead" tag and the "odd" and "even" classes for the rows- should allow you to render the table invisible via CSS.

Not sure of a way to not actually render the table in the page.


Ping & DNS - my free Android networking tools app
Bilal A.Siddiqui
Ranch Hand

Joined: Feb 22, 2010
Posts: 31
Thanks for your reply Ulf. Can you please suggest me any other way to export the data from resultset to excel. i am using struts.

Regards & Thanks
Bilal
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
You can use a library like Apache POI or jExcelApi to create XLS/XLXS files, and stream those files to the client.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display Tag