Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jsp to Excel

 
Bommaraju Chaitanya
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is Chaitu.In My application i need to send the data from database to excel sheet using jsp.
I am getting the Excel sheet but, I am not getting the values retrieved from database.
Can any one have idea. Please help me
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
 
Prafulla N. Patil
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use Apache POI that is good for excel

POI
 
Bommaraju Chaitanya
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I got the Application.

JSP To Excel Easily.
By using POI jar file.
And Code as
String Filename="UsersList.xls";
response.setContentType("application/vnd.ms-excel");
response.setHeader("Expires","01 Jan 2007");
response.setHeader("Content-Disposition", "attachment;filename="+Filename);

OutputStream out1 = response.getOutputStream();
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic