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 How 2 Get reports 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 "How 2 Get reports" Watch "How 2 Get reports" New topic
Author

How 2 Get reports

sajeevi bangamuwage
Greenhorn

Joined: Jan 19, 2005
Posts: 21
Hi All,

Im Sajeevi Thathsara. Im developing a computer system. they need some reports generate from the system. Im developing it by using Java language. I can get the data from the DB and put it into the table. i want to export it to an excel and get reports. Im using SQL Server Developer 2000. in that also we can export. But user cnt. so i want to know way to export the data in the table to excel.

i'll on Jfree reports also. But from that can get only PDF files. the excel exporting also can do but i cant get it nicely.

I want some event hanle coding to export data to excel and save that file in the location where we want.

Thank you,
Sajeevi (SCJP)
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Several things you can investigate:

Google for "POI" or other "java com bridge" products that let Java connect to Excel. I don't know if any of the free ones are good enough for production use in a business. Some of them are quite expensive.

Connect to Excel as a database using JDBC/ODBC. You can refer to an Excel named range like a table. I'm not certain this is possible, but I've done it from other languages with ODBC.

Write CSV from your application to a disk file and make the user import CSV.

Put data into the clipboard and invite the user to paste into Excel. Not a real sophisticated solution.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
Don't get me started about those stupid light bulbs.
 
subject: How 2 Get reports
 
Similar Threads
DisplayTag Export Pbm
How to convert XML to Excel Sheets
Exporting from Java to MS Word and MS Excel
find templates to some interfaces
jsp crystal reports xls