aspose file tools*
The moose likes Object Relational Mapping and the fly likes Entire Records to display in exportToexcel  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Entire Records to display in exportToexcel  " Watch "Entire Records to display in exportToexcel  " New topic
Author

Entire Records to display in exportToexcel

soma lingam
Greenhorn

Joined: Apr 26, 2007
Posts: 19
Hi,


In my project i am using (Struts ,Hibernate, EJB, Oracle)


I need to display 15 records for a page i done it by pagination and Limiting the results at DAO level
For doing pagination i am using Display Tag so based on display tag i am
display 15 records BUT

now, i need to get all the records that are available in the DB when i click on ExportToExcel button which is used to display the entire records in excel

or if i select some of the records then those only need to display at exportToexcel

or any simple way to design so that
can anybody help me in this regards...

Thanks,
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Just do your query as normal, and when the results come back, format them in a comma separated fashion. Then, send those to the client with the mime-type changed to text/xsl, or whatever the Excel mime-type is. It should be easy if your queries are already bringing back the information you need.

-Cameron McKenzie
soma lingam
Greenhorn

Joined: Apr 26, 2007
Posts: 19
Hi Cameron,

as the display tag i am using the object that i am passing to display to form by (Value Objects) like paginationvos for that the query i passed to get the maxresults as 15
setMaxResults(15) that is why i couldn't able to get all the records to drop it into exportToexcel any idea that i can drop to vo to form by specifying any query any example for this

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entire Records to display in exportToexcel