File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Export to Excel

 
Mangala Madasamy Erulappan
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to JSF.
I have a requiement of exporting the list of records displayed in jsp page to excel sheet.
The data is stored in resulltrow .
I have written the following code to get the columns to a string array.


I dont know to proceed further.How to iterate over the array and display the data in excel sheet.
Please anybody help....
 
Ganesan Ramakrishnan
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can write the data to excel file using poi from apache.

poi

this is the open source jar for writing into excel file.

Regards
Ganesan
 
Mangala Madasamy Erulappan
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Thanks for the reply. But my project requires me to write in simple java without any external jars
 
Mangala Madasamy Erulappan
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
Thanks for the reply. But my project requires me to write in simple java without any external jars
 
Ganesan Ramakrishnan
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. But the problem is when you write in excel file without using the external jar means its writing the all datas into single column. So you difficult to read it. Its showing like text file. So for better readability go for poi.


Regards
Ganesan
 
Mangala Madasamy Erulappan
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is actually writing table headers into excel sheet in seperate columns.
But my data is displayed in the form of resultrow.I want to know how to get each data from resultrow into string to export to excel
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic