Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

More... on how to generate output from "jsp to excel"

 
vijay sinha
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi People,
requirement: I have to generate reports of the output from a jsp into excel spreadsheet. Presently its displayed in a html page.

what i did: I have searched the forum for generating the output from a "jsp to excel sheet" but couldn't get a complete idea/solution of how this output is generated.
i have got some info from the forum on "javaexcelapi" and from apache reg. "hssf". I tested with javaexcelapi and it seems to work fine except that i haven't gone into details as to what other factors i need to look upon to start using this api in my project.
Could someone who had executed such a requirement, please can you share information on did the complete module was built?
many thanks,
vijay
[ August 08, 2002: Message edited by: vijay sinha ]
 
Tiffany Sun
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if this is what you want, but here's what I did to generate Excel spreadsheets:
<%@ page contentType="application/vnd.ms-excel" %>
or
response.setContentType("application/vnd.ms-excel");
[ August 07, 2002: Message edited by: Tiffany Sun ]
 
vijay sinha
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tiffany, I have to kick myself for the dumbness/laziness about this(not reading the "core servlets" ! A "single line of code" could have changed my thought process for the problem at hand.
Why i mean is that i was really thinking to resolve in terms of including 'javaexcelapi' as a means to generate the excel sheet and thereby formatting it. But, as i go through for the 2nd time with my google-search, i found that the latest excel recognizes the html table and we have to only work around the html table generation to get the ouput in excel...
Now, my problem is w.r.t the html table. I am generating this table dynamically (like incl. jsp scriptlets...etc) The excel doesn't recognize if i put "response.setContentType=..." while i generate the html table.
This seems to have come up in one of the earlier threads, but i couldn't get an answer...
Did any one has found a solution to this kind...pls. share...

vijay
[ August 08, 2002: Message edited by: vijay sinha ]
 
evan theon
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the content-type solution you gave would be great for MS Excel, what should i do to convert my jsp page into openoffice spreadsheet?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic