1 Reply Latest reply: Aug 10, 2010 1:22 PM by user598251 RSS

    Excel Output is being displayed as HTML in the browser

    773761
      Hi All,

      I am using PeopleSoft XML Publisher 5.6.2 to generate an Excel report using RTF template. The report runs successfully.

      However, when I click the Output file link in the View Log page of process scheduler, the file is being displayed as a HTML page, though the extension of the file is .xls.

      Also when I try to save the file by using 'Save Taget as' option, the browser prompts me to save the file as 'mhtm' file and not 'xls' file.

      The following is an extract from the output file.


      --------------------------------------------------------------------------------
      <html>
      <!-- Generated by Oracle XML Publisher 5.6.2 -->
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>IM Top 10 Surplus & Deficit Locations</title>

      --------------------------------------------------------------------------------

      After doing some research on Internet, I found the following blog post(dated back in 2008) to describe my situation and a workaround to the problem.

      http://peoplesofttipster.com/2008/04/16/xls-xmlp-output-opening-in-browser-not-excel/
      http://peoplesofttipster.com/2008/04/18/xls-xmlp-output-opens-in-browser-workaround/

      Workaround described in the above blog post is to update the charset to us-ascii replacing UTF-8. This seems to work. But with limited file processing capabilities of peoplecode, this workaround is not a simple solution.

      I also verified the mime-type mapping in the web.xml file in the webserver. Please find below the .xls mime-type mapping in the web.xml file.

      <mime-mapping> <extension> xls </extension> <mime-type> application/vnd.ms-excel</mime-type></mime-mapping>

      Question:
      1.How do I force the browser to open the excel output file using either Excel plugin or Excel Application instead of displaying it as HTML page?
      2.If not the above, how can I force the system to promt the user to save the file as Excel file instead of mhtml?

      Additional details :

      work enivronment
      PeopleSoft FSCM 8.9
      PeopleTools 8.48.17
      Oracle 10g
      Windows NT

      Any help would be greatly appreciated.

      Thanks & Regards,
      Vamsi Krishna