This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Just wonderind if it would be possible to export data from java to exel
Bill Krieger
Ranch Hand
Joined: Sep 27, 2001
Posts: 53
posted
0
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
posted
0
Originally posted by john mattucci: Just wonderind if it would be possible to export data from java to exel
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
posted
0
Try JaCob (Java-COM bridge) http://danadler.com/jacob/ In fact, it comes with an example that exports data from java to excel