• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using Java to Output to Excel  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1785
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Waht is the easiest most inexpensive way to use Java to take data from a remote data base and present it in an Excell spreadsheet? This all needs to be done with JSP and Servlets.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way is to get the data from the database using JDBC and writing it to a CSV (comma-separated values) file, which you can open in Excel.
 
Steve Dyke
Ranch Hand
Posts: 1785
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to do more than just present a list in excel. Waht I need to produce is a semi-complex cross tabular matrix with calculations. In my previous application development(Microsoft Visual FoxPro) I was able to build the spread sheet one component at a time. Will this be possible from Java and without some costly API to have to purchase?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the POI library. Its Excel file support is rather extensive, and it's easy to get started with.
 
li qd
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for rich format excel export,you can try this one:
Java spreadsheet component
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a bit advanced for beginners. I'm promoting this to the intermediate forum.
 
Prafulla N. Patil
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Apache POI that will serve your purpose
 
Joe Irudayaraj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also use JExcel to serve your Purpose
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!