• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How do i save a file that has been generated using JSP in excel format .

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im generating report in jsp ,
I have to save this file in excel format . I tried to save this by using the file option that is File ->Save As but it does not provide me to save it in excel format. How can i save it in excel format.

My second question is that im providing a button saying it as "save" where when i press that button the report that i have mention above should save in excel format . How do i code this using Java coding .

 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSPs are generally used for generating HTML. If you want to save it to something Excel can make use of, you need to generate CSV or proper XLS files (for which you'd need to use a servlet - JSPs can't create binary content).
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to make a call to the server and have to add these headers to the page

Eric
 
    Bookmark Topic Watch Topic
  • New Topic