• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Export to Excel

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic