Discussions

General J2EE: exporting to excel using jsp

  1. exporting to excel using jsp (9 messages)

    hi,
    i have a problem when i open any excel file via a browser
    i'm unable to view the results in excel format;so i gave mime-mapping as follows
     <mime-mapping>
      <extension>xls</extension>
      <mime-type>application/excel</mime-type>
     </mime-mapping>
    also i included this in the jsp
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition","inline; filename=" +"C
    "+"filename.xls");

    after this its opening in excel format in the browser with no close button and no data
    please help me asap

    Threaded Messages (9)

  2. How are you opening the excel file?

    Are you providing the link in your jsp page for excel file stored in server file system? or

    You are trying to show the output data of a JSP page in excel file format ?


    Anil Saidneni
  3. thanks[ Go to top ]

    i solved the problem
  4. provide[ Go to top ]

    please provide details on how to solve it

  5. provide[ Go to top ]

    please provide details on how to solve it

     

    Please see the details posted by me on this thread for an example of how to add excel functionality to your JSP code

  6. miss understood[ Go to top ]

    I was speaking of

     

    >>how to after this its opening in excel format in the browser with no close button and no data
    please help me asap<<

    how did you solve this problem the no close button ??

  7. Can you share with me how to output data of a JSP page in excel file format ? Thanks.
  8. Export JSP data in Excel (xls)[ Go to top ]

    Just insert into your JSP the following line of code.


    Life long and prosper
    Tobias
  9. Export JSP to Excel[ Go to top ]

    Its fairly simple and can be done with minimum changes to your existing JSP. Take a look at this example on quicklyjava.com:

     

    http://www.quicklyjava.com/export-web-page-to-word/

     

  10. Export JSP to Excel[ Go to top ]

    Ignore the link in the previous post, here is the correct link:

     

    http://www.quicklyjava.com/export-web-page-to-excel/