generate excel output from database ?

Discussions

Web tier: servlets, JSP, Web frameworks: generate excel output from database ?

  1. generate excel output from database ? (3 messages)

    I need to output an excel report from a database, is there any taglib that
    can I use for that or an example of a servlet .
    thanks



  2. set the content type of the response object to Excel's MIME type. i personally use

    response.setContentType("application/x-msexcel");

    but I've seen an another valid content type.

    you can lazily output your data to an HTML table and let excel try to parse it. a better idea is to create a sample spreadsheet in Excel, export it to XML, and view the source to see how Excel handles functions and tabular data.

    then you can generate the XML yourself and it will be ready to use by Excel!
  3. could you please give me a small example ?
    thanks
  4. See Excel taglib in Coldtags suite:
    www.servletsuite.com/jsp.htm