File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes is it possible to export info to exel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "is it possible to export info to exel" Watch "is it possible to export info to exel" New topic
Author

is it possible to export info to exel

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
Just wonderind if it would be possible to
export data from java to exel
Bill Krieger
Ranch Hand

Joined: Sep 27, 2001
Posts: 53
Originally posted by john mattucci:
Just wonderind if it would be possible to
export data from java to exel

You can certainly write to a file in a form that Excel will understand. Just create a text file whose name ends with ".csv". Eacg row in the spreadsheet corresponds to one line in your text file. Each column in the spreadsheet is mark by a comma seperator character in the text file. If a comma is part of your cell value, the entire cell value can be enclosed in quotes ("). You can embed Excel formulas, as well as values.
The ".csv" file does not give you the full power of Excel, and there may be an API you could purchase that does. For simple exporting of data to a spreadsheet, however, this format works well.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by john mattucci:
Just wonderind if it would be possible to
export data from java to exel
If you want to read Excel files as well, or if you need to manipulate existing Excel files, then IBM's Excel accessor bean suite may be of interest. Alternatively there's also a general Java-ActiveX bridge from the same source.
- Peter
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Actually Excel is just a database in disguise. You can write to it using JDBC with a little SQL and the driver provided my Microsoft (it gets loaded when you install Excel).


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

Joined: Oct 10, 2001
Posts: 71
Try JaCob (Java-COM bridge) http://danadler.com/jacob/
In fact, it comes with an example that exports data from java to excel
Guennadiy VANIN
Ranch Hand

Joined: Aug 30, 2001
Posts: 898
http://www.javaworld.com/javaworld/javatips/jw-javatip77.html? http://www.javaworld.com/javaworld/javaqa/2001-08/02-qa-0824-excel2.html? http://www.javaworld.com/javaworld/javaqa/2001-06/04-qa-0629-excel.html
and there a lot more references if you enter these links

[This message has been edited by G Vanin (edited October 26, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is it possible to export info to exel