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

JSP to Excel sheet

Sahana Hegde
Ranch Hand

Joined: Jan 27, 2008
Posts: 67
Hi guys,
Please help me out....

I have a jsp with a table. when I click on the "import to excel button" it has to create an excel sheet of the table. Currently I am doing it this way

create a string buffer and append the contents of the table to it
sbCsv.append( sPub + " " + sIssueMonth + " " + sIssueYear + " Forecast Report \n" );
sbCsv.append("Sales" + "\t" );
sbCsv.append("Ran Last Year" + "\t" );
sbCsv.append("Pages 100%-90%" + "\t" );
sbCsv.append("Pages 75%" + "\t" );
sbCsv.append("Pages 50%" + "\t" );
sbCsv.append("Pages 25%" + "\t" );
sbCsv.append("Forecast" + "\t" );
sbCsv.append("Forecast Last Week" + "\t" );

Then writing this to the excel sheet. Is there a better way to do it ???
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2718

This topic has been discussed before
try searching the forum and
check this.

Hope this helps

|Asking Good Questions|
Sahana Hegde
Ranch Hand

Joined: Jan 27, 2008
Posts: 67
Yes that helped.....tried something on similar lines.
Thanks. I appreciate it.
Don't get me started about those stupid light bulbs.
subject: JSP to Excel sheet