• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Saving jsp output to a Excel File in different tabs

 
peter brews
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a way of saving the output generated from a JSp file into to a excel file by modifiying the Headers. The code looks like this
String fname=abc.xls
response.setContentType("file_content_type);
response.setHeader("Content-disposition","attachment;filename="+fname)
The output is saved to a Excel file abc.xls
IT THERE A WAY TO SAVE THE OUTPUT IN DIFFERENT TABS IN THE EXCEL FILE.
For example : Output1 - to be saved in abx.xls on excel tab TAB1
Output2 - to be saved in abc.xls on excel tab TAB2
and so on
Please help me
 
Michael Zalewski
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to check out
Jakarta POI
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that is absolutely fantastic, seriously - thanks for the tip. btw, a simpler method might be possible to implement using MIME? it might be that if you send multiple documents back it will pick them up seperately. CSV by itself does not have an automatic way to page contents, in which case you will need to look at an alternative. If you are not sure how to try this out, then it might be simpler to just learn POI because it would require some experimentation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic