aspose file tools*
The moose likes Servlets and the fly likes ResultSet  to MS-Excel. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "ResultSet  to MS-Excel." Watch "ResultSet  to MS-Excel." New topic
Author

ResultSet to MS-Excel.

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
I have a table in the DB with more than 75,000 records.
Is it possible to write first 30,000 records in one Excel work sheet & next 30000 records in the next worksheet and so on till we reach the end of record.
[ October 17, 2004: Message edited by: srini vasan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Ajith Anand
Ranch Hand

Joined: Aug 30, 2004
Posts: 40
Sure....

You may have two approaches to the problem.
1. This is a generic approach and which would work across all databases. This is explained below please refer the code snippet




2. You may also do this by applying row-limit-constraints on the query itself....
eg in oracle you may want to say

you may want to do this incase you want a multithreaded approach to filecreation


LXI Technologies P Ltd
[url]www.lxisoft.com[/url]
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Ajith,
I cant get you ..Logic for spliting the records into 30000 is fine
but what i need is ...
if i set the Mime Type to Excel.. it will write in only one sheet ..

Srini
[ October 17, 2004: Message edited by: srini vasan ]
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
I hope POI can solve this problem ..
But where cani find the jar's necessary for POI.
Is it free download ?
Ajith Anand
Ranch Hand

Joined: Aug 30, 2004
Posts: 40
Hi Srini,

it is a free download....you will find some of these samples relevant...
excel worksheets
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Originally posted by Ajith And Ajith And:
Hi Srini,

it is a free download....you will find some of these samples relevant...
excel worksheets


But where can we find the relevant jars.

Srini
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Moving this to JDBC, it doesn't appeat to be Servlet specific.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResultSet to MS-Excel.