File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Creating an Excel file from Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Creating an Excel file from Java" Watch "Creating an Excel file from Java" New topic

Creating an Excel file from Java

Javed Sardar
Ranch Hand

Joined: Sep 10, 2002
Posts: 33
Is it possible to generate an Excel file from Java. This is possible in VB, we need to make an instance of Excel file, get a handle of it, put data into the selected row-column and save the file.
Is it posible to do a similar job in Java ?
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

There's JExcel ( See if it is of nay help.
- Manish
Amit Manurkar

Joined: Apr 03, 2003
Posts: 11
You can also try the POI from Apache. A good API for reading / writing Excel / word files.

Amit Manurkar
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Sure this is possible. You need to find the dll that VB is using, and then write some JNI in your java app to interface with that dll.
Alternatively, if you are just posting data to Excel you can just treat it like a database and use JDBC to write to it. If you do a search on the JDBC forum for "Excel" you will find quite a bit of conversation about this.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Javed Sardar
Ranch Hand

Joined: Sep 10, 2002
Posts: 33
Thanks very much Cindy,
The JDBC thing is what I wanted.
I agree. Here's the link:
subject: Creating an Excel file from Java
jQuery in Action, 3rd edition