The easiest approach would be to see the JSP pages MIME type to text/plain
and then have a JSP
page that delivers the data in tab or comma delimited format. The problem is
that the browser
is simply going to show the text vs. offering to save it as a file.

Another approach would be to purchase one of the Excel components such as
Formula One which
can be used on the server side to generate an Excel document. You servlet
would use Formula
One to generate the Excel file and then stream it to the end user with the
Excel MIME type.

Another approach would be to use a digitally-signed Java applet that lets
you write the file
to the end user's disk in whatever format you wanted.


Dave Bolt
ATSC/SPAWAR ASAT Team
Bolt's Law of Bandwidth - There is always plenty of network bandwidth, just
none for you.


-----Original Message-----
From: hua ge [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 11, 2000 11:40 AM
To: [EMAIL PROTECTED]
Subject: invoke excel/word from jsp/servlet


Hi,
I have a html search result page (done in jsp/servlet) containing lines of
found records.

our client like to set up a save button on this page and it will invoke word
or excel window which will contain all the result data in Text(tab delimited
.txt) format or in CSV(Comma delimited .csv). then they can save as the
files to their local disk.

can someone share some idea or offering some sample code to implement this
kind of application?

I assume I can set ContextType to some MIME type to invoke excel or word,
but how the data in the page can be transfored to the excel or word in a
certain format? I need detailed help.

I really appreciate if anyone can help me.

Thanks in advance

Helen


_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to