CREATING MS EXCEL DOCUMENTS VIA SERVLETS, PART 1
Suppose your accounting department wants to load information from an
employee database into its employee Excel spreadsheet. How could you
deliver that information? One method is to provide a file of the
Employee table information, which would be importable. But this method
requires that you create this file each time the accounting department
has a request. Furthermore, if the accounting area has trouble loading
the data, you're presented with a technical support issue.
A better method is to provide the accounting department with a URL that
dynamically produces an Excel document. Not only would this please the
department, but also your job is made that much easier.
Accomplishing this cool feat is as easy as 1-2-3. By utilizing MIME-
type specification in the header of the returned document, you can tell
the browser that the information is one of many possible types.
There are many browser-supported MIME types, and listings of these can
easily be found on the Web. For example, when the browser is told that
the returning document is of Excel type, Excel is opened with Internet
Explorer and the returning document dynamically loaded. Netscape will
typically provide the option of saving the document as the default name
and then Excel can open it. If the name isn't provided specifically in
the returning header, the document will be the name of the URL's
filename by default.
See more on that on http://www.techrepublic.com
Regards,
Stefan
Debasis Dash wrote:
> Hi all,
> I want to generate the excel file based on the data retrived from database
> in jsp.How can i do that?
> help me please.
> Thanks
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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