Discussions

General J2EE: How to display Excel Report along with jsp

  1. How to display Excel Report along with jsp (1 messages)

    Hi,

    Using Action button on jsp page generated event on serverclass for generating Excel Reoprt. I want display this Excel Report along with same jsp page.

    I got File path in JSP. I am trying to open from java script function. But i am getting Brower with excel text.

    My code is

    open.window("url")

    could any body can hwlp?

    Thanks
    Mallik
  2. You probably could have described the problem better... but if I understand correctly, you have an excel document (or generate it dynamically) that you want to be accessible to a client via a jsp page.

    If you see the excel text, that's good, you've returned the doc without specifying the mime-type.

    IIRC, it's something like:
    response.setContentType("application/vnd.ms-excel")

    you can also use a "Content-disposition" header (i think its value would be inline).

    hth,
    sv