Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it possible to export info to exel

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wonderind if it would be possible to
export data from java to exel
 
Bill Krieger
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
raj madhuram
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic