File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Export to Excel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Export to Excel" Watch "Export to Excel" New topic
Author

Export to Excel

Mangala Madasamy Erulappan
Greenhorn

Joined: Jul 08, 2008
Posts: 6
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

Joined: Mar 18, 2008
Posts: 88
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

Joined: Jul 08, 2008
Posts: 6
HI,
Thanks for the reply. But my project requires me to write in simple java without any external jars
Mangala Madasamy Erulappan
Greenhorn

Joined: Jul 08, 2008
Posts: 6
HI,
Thanks for the reply. But my project requires me to write in simple java without any external jars
Ganesan Ramakrishnan
Ranch Hand

Joined: Mar 18, 2008
Posts: 88
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

Joined: Jul 08, 2008
Posts: 6
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
 
subject: Export to Excel