Display excel in JSR168 portlet - Websphere

This is a discussion on Display excel in JSR168 portlet - Websphere ; Hi, We have a requirement to show search results in excel sheet in portlet window. I tried changing the content type..but it throws IllegalArgumentException because the content type "application/vnd.ms-excel" is not supported. Is there any other way to show excel ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Display excel in JSR168 portlet

  1. Display excel in JSR168 portlet

    Hi,

    We have a requirement to show search results in excel sheet in portlet window. I tried changing the content type..but it throws IllegalArgumentException because the content type "application/vnd.ms-excel" is not supported.

    Is there any other way to show excel in portlet? Even if it can show open/save dialog, it should be ok.

    Thanks
    Naveen

  2. Re: Display excel in JSR168 portlet

    You can't output binary data of any kind in a portlet. All portlet
    output must be the primary output type for the device you are using.
    For example, text/html.

    To accomplish what you want to do, you will need to either put the excel
    data in a file on the filesystem or serve it up through a servlet either
    packaged with your portlet or somewhere else on your server.

    Then, in the portlet output, write markup that causes the browser to
    access the servlet/file to display the data. For example, in an