• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JSP Export to Excel with multiple pages

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am exporting data into excel from my jsp page using,
<%response.setContentType("application/vnd.ms-excel");%>

It works fine.

What I would like to be able to do, however, is to create a new sheet (or tab if you prefer) for each table ( Suppose one table in jsp provides the information on employees and other table provides the information on departments).That means here two excell sheet will be created, one contains the information about employee and another contains information about department. Here I am not using any third party component like jxl etc.

Does anybody have an idea how to do this in jsp.

I would appreciate any help,

Swarup Sarkar
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think so. It�s not possible with JSP/HTML. JSP displays HTML content in Excel format that�s not a true Excel work book to display multiple work sheets.

When you decided to use different worksheet in a same workbook you have to use JXL or any other third party API.
 
author & internet detective
Posts: 42102
933
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swarup,
Welcome to JavaRanch!

Apache's HSSF is a good library for working with more complex Excel documents. I recommend using a servlet rather than a JSP since you will be dealing with a lot of Java code.
 
Goodbye moon men. Hello tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic