This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Writing Excel in java takes hours to create. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Writing Excel in java takes hours to create." Watch "Writing Excel in java takes hours to create." New topic
Author

Writing Excel in java takes hours to create.

Waez Ali
Ranch Hand

Joined: Jan 24, 2005
Posts: 43
Hello,

I have a program that executes a sql and write the extract into excel sheet, the resulset of sql fetched is about 400k and whole process is taking 3 to 4 hours.

Any suggestions how I can improve the time..?

Thanks
Waez.
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4164
    
  21

The first thing is to figure out which step takes a long time so that you know whatever effort you put into optimizing gets applied to the correct place.


Steve
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41033
    
  43
What does "400k" mean - 400000 rows? 400KB of data? Something else?

I agree with Steve that the first step is to figure what's taking up all that time - reading the data from the DB, or writing to an Excel file.


Ping & DNS - my free Android networking tools app
Debal Guha
Greenhorn

Joined: Feb 21, 2013
Posts: 9

which API are you using? POI/Jxl or any other?


You just need to know where to find it!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Writing Excel in java takes hours to create.
 
Similar Threads
web reporting...
Transfer Excel Sheet information to database
is "Microsoft Office Specialist Certification: Microsoft Office Excel 2010 (Expert)" worth it?
Upload the Excel data in the Oracle Database
Outputting sql output to spreadsheet