Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP to Excel sheet

 
Sahana Hegde
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
eg:
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" );
sbCsv.append("\n");

Then writing this to the excel sheet. Is there a better way to do it ???
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This topic has been discussed before
try searching the forum and
check this.

Hope this helps
 
Sahana Hegde
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that helped.....tried something on similar lines.
Thanks. I appreciate it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic