Portal : JSP : Output in an Excel File.

Hi,
I am unable to get the output on a JSP Page in Microsoft Excel
I am trying to generate an Excel Report from my Portlet. I am picking up the data for the Report from Oracle Internet Directory.
I have created a simple JSP file ( as a Portlet ) and deployed it on Oracle App Server. I then registered a new Provider for the deployed JSP Page and added the JSP as a Portlet in a new Portal Page.
I am trying the following code snippet in the JSP :
<%@ page contentType="application/vnd.ms-excel"%>
I get this weird error :
AbstractResourceRenderer.renderBody - received IOException
java.io.UnsupportedEncodingException: Media Type of a TextResponseWrapper must start with "text/"
If I am correct, Portal should support this feature. I must be able to publish reports to an Excel File.
I am new to Oracle Portal and I find this strange. The JSP page works fine in JDeveloper, but when I access it via Oracle Portal, I get the " UnsupportedEncodingException ".
I posted my question on Metalink and was told to post my question in this forum.
I am not sure if I need to post any other information or Configuration Settings - please do let me know if any other information is necessary.
Thanks,
Sandeep.

Ok,
After many sleepless nights and a long struggle, we were able to arrive at a workaround - simple & something that works.
We created a Servlet ( not a Portlet ) that generates the Excel File. The Servlet is not a Portlet and as such is not restricted in the content-types that it can use. We let the user arrive at this Servlet via a simple HTML link.
Well, that's about it ! I just wanted to post this so that anyone else tearing their hair apart with the same issue can find some solutions.
Still, I strongly feel that a superb product like Oracle Portal should support the various content types.........
Regards,
Sandeep

Similar Messages

  • Query output transfer to excel file

    hi all,
    how can i query output transfer to excel file ? i am not using any tool. please suggest me. is there any method that i transfer that output to excel file?

    You can create a csv file. See dump_csv function from Tom Kyte.

  • Oracle Matrix Rpt output to Microsoft Excel File

    I am looking for a solution that would take my current Oracle 9i matrix report output directly to an excel file. I have clients that need to see the report not in a pdf format(which I currently use) but in an excel format.
    Thanks,

    You could either use:
    a) DELIMITED output, assuming that the matrix isn't too large.
    b) DELIMITEDDATA output, which will just give you a dump of the data, and you'd need to construct the cross tab directly.
    c) In you're using 9i, then you could use jsp tags to output directly into an Excel html file (this could get pretty complicated for a matrix report). See an example of this at http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
    Regards,
    Danny

  • Multiple JSPs output into single PDF file

    Could anyone guide me on how do I combine output of multiple JSP files into a single PDF file? I have got 8 different reports and shall required to have single output of all of them in a PDF file. Its urgent. Please help.

    Hi Mahalakshmi,
    Clik on the link to view document: <b>[Combining Multiple Smartform Outputs Into One PDF File|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450?overridelayout=true]</b>
    Thanks
    Venkat.O

  • How to output to an excel file?

    Hi,
    I have written a program that gets data from the database and I like to find out how to output the data to an excel file. I have read about similar topic on the discussion board and the solution are for the online application. Mine is a desktop application. The user can specify what the destination file is. Can anyone help. Thanks.

    The simpliest way is to take your data and write it to a Comma Dilimeted File which Excel can read without any problems or user intervention. You would use an ObjectOutputStream. Hope this helps.

  • Alv output- download to excel file

    Hi
    I have ALV report. My requirement is
    For example i have 10 records in my ALV output.
    I want to download first 5 data to excel file.
    so i need to select the data and click the button download in alv screen. I created the download button in ALV screen.
    how to write coding for this

    Hi Kumar K,
    U can do it by feeling another internal table from the final internal table which u displayed...
    suppose u want the record 5 to 12 then
    LOOP AT itab FROM 5 TO 12.
    Append itab to itab2.
    ENDLOOP.
    So now Itab2 contains record 5 to 12...
    Logic:
    Create one Custom Button ... Now For Sy-ucomm of that button... provide popup window with FROM and TO parameters...
    Then using Loop... Endloop... select that much records form internal table to another internal table say itab2...
    Now using GUI_DOWNLOAD or WS_DOWNLOAD or any other FMs and pass the internal table to this FM...
    For more information on LOOP Syntax...
    LOOP AT itab - cond
    Syntax
    ... [FROM idx1] [TO idx2] [WHERE log_exp].
    Extras:
    1. ... FROM idx1
    2. ... TO idx2
    3. ... WHERE log_exp
    Effect
    The table rows to be read in a LOOP-loop can be limited by optional conditions; if no conditions are specified , all rows of the table are read.
    Addition 1
    ... FROM idx1
    Effect
    The specification FROM is only possible with standard tables and sorted tables. This specification only accepts table rows starting from table index idx1. For idx1, a data object of the type i is expected. If the value of idx1 is smaller or equal to 0, then it will be set to 1. If the value is larger than the number of table rows, the loop is not passed through.
    Addition 2
    ... TO idx2
    Effect
    The specification TO is only possible with standard tables and sorted tables. The specification only accepts table rows after table index idx2. For idx2, a data object of the type i is expected. If the value of idx2 is smaller or equal to 0, then the loop will not be passed. If the value is larger than the number of table rows, then the value will be set to the number of rows. If idx2 is smaller than idx1, then the loop is not passed as well.
    Addition 3
    ... WHERE log_exp
    Effect
    WHERE can be specified with all table-types. After WHERE, you can specify any logical expression log_exp in which the first operand of any singular comparison is a component of the internal table. For this reason, all logical expressions are possible except for IS ASSIGNED, IS REQUESTED and IS SUPPLIED. Dynamic specification of a component through bracketed character-type data objects is not possible. Loops at sorted tables must have compatible operands of the logical expression. All rows are read for which the logical expression is true.
    Notes
    The logical expression specified after WHERE is analyzed once at entry into the loop. Possible changes of the second operand during loop processing are not taken into account.
    While with standard tables all rows of the internal table are checked for the logical expression of the WHERE- addition, with sorted tables and hash tables (as of Release 7.0) you can achieve optimized access by checking that at least the beginning part of the table key in sorted tables and the entire table key in hash tables is equal in the logical expression through queries linked with AND. Optimization also takes effect if the logical expression contains other queries linked with AND with arbitrary operators.
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • Financial Reporting - Scheduling a Batch to Output/Email an Excel File

    We're using version 9 and have no good way to systematically schedule a batch report and have the output saved/emailed as an Excel file, only pdf. Is this functionality in version 11? Has anyone developed creative alternatives?
    Thanks

    You may be able to utilize Excel and SmartView VBA features to achieve the same goal as this. With enhanced security in the newer realeases of Excel automacally sending emails could be a bit tricky, but if you look around on the web you should be able to find something with this ability. I'm not sure that you could use an FR report, but a report utilizing HSGetValue or ad-hoc functionality should function.

  • Converting java output to a excel file

    I am storing the datas retrived from a file in JTable. now i need these data to be exported to an excel file. how will i do that

    http://forum.java.sun.com/thread.jspa?threadID=600161&messageID=9526245#9526245

  • Export the sql output to an excel file

    Hi,
    I would llke to know how can we export an sql query out put from oracle 9i to an excel file using a java code...
    Thanks in advance..
    Naveen

    Naveen,
    You can access Microsoft Excel files via JDBC using the "JdbcOdbc" driver that comes with the JDK.
    Hence a simple matter of using JDBC to both extract from Oracle and insert into Excel.
    You will find many resources on the Internet explaining how to do this.
    Please note that I am certain that this is not the only way to achieve this.
    Good Luck,
    Avi.

  • Report output to MS. Excell file

    I want to print my report to MS. Excell file,
    Is there any driver to do that ?
    Or Is there anyway to do that ?
    I need the solution ASAP.
    Thank You
    ardian
    null

    Ardian B. Santoso (guest) wrote:
    : I want to print my report to MS. Excell file,
    : Is there any driver to do that ?
    : Or Is there anyway to do that ?
    : I need the solution ASAP.
    : Thank You
    : ardian
    Hi Ardian B. Santoso,
    1. Develop the Report in Character Mode.
    2. Save the O/P to file.
    3. And open the file with MS Excel.
    I hope this would be helpful for U.
    Have a Good Weekend.
    Good Luck
    Senthil Ramasamy
    null

  • Download alv output to an excel file

    Dear experts,
                    I am using oops alv if i click file download button if i select anything except <b>spread sheet</b> it gives a short dump . Downloaded values are correct i want to know how to save it as a local file also to resolve for other options.
    regards,
    balaji

    Hi Balaji,
    Refer this link (Very helpful): http://www.****************/Tutorials/ALV/ColoredOutput/Program.htm
    Multi-colored output of ALV in EXCEL
    There would be many situations where we need to highlight some of the records in bold or different color depending on some value. In this document, we showcase how this can be achieved. Look at the screenshot of an excel sheet with different colors and bold in some cells.
    Following is a demo program in achieving the same:
    Report ZMULTICOLOR_TEST no standard page heading.
    this report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    include ole2incl.
    handles for OLE objects
    data: h_excel type ole2_object,        " Excel object
          h_mapl type ole2_object,         " list of workbooks
          h_map type ole2_object,          " workbook
          h_zl type ole2_object,           " cell
          h_f type ole2_object,            " font
          h_c type ole2_object.            " color
    DATA: FILENAME LIKE RLGRAP-FILENAME.
    tables: spfli.
    data  h type i.
    table of flights
    data: it_spfli like spfli occurs 10 with header line.
    *&   Event START-OF-SELECTION
    start-of-selection.
    read flights
      select * from spfli into table it_spfli.
    display header
      uline (61).
      write: /     sy-vline no-gap,
              (3)  'Flg'(001) color col_heading no-gap, sy-vline no-gap,
              (4)  'Nr'(002) color col_heading no-gap, sy-vline no-gap,
              (20) 'Von'(003) color col_heading no-gap, sy-vline no-gap,
              (20) 'Nach'(004) color col_heading no-gap, sy-vline no-gap,
              (8)  'Zeit'(005) color col_heading no-gap, sy-vline no-gap.
      uline /(61).
    display flights
      loop at it_spfli.
        write: / sy-vline no-gap,
                 it_spfli-carrid color col_key no-gap, sy-vline no-gap,
                 it_spfli-connid color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityfrom color col_normal no-gap, sy-vline no-gap,
                 it_spfli-cityto color col_normal no-gap, sy-vline no-gap,
                 it_spfli-deptime color col_normal no-gap, sy-vline no-gap.
      endloop.
      uline /(61).
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-007
           exceptions
                others     = 1.
    start Excel
      create object h_excel 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      set property of h_excel  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'  .
    PERFORM ERR_HDL.
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-008
           exceptions
                others     = 1.
    get list of workbooks, initially empty
      call method of h_excel 'Workbooks' = h_mapl.
      perform err_hdl.
    add a new workbook
      call method of h_mapl 'Add' = h_map.
      perform err_hdl.
    tell user what is going on
      call function 'SAPGUI_PROGRESS_INDICATOR'
         exporting
              PERCENTAGE = 0
               text       = text-009
           exceptions
                others     = 1.
    output column headings to active Excel sheet
      perform fill_cell using 1 1 1 200 'Carrier id'(001).
      perform fill_cell using 1 2 1 200 'Connection id'(002).
      perform fill_cell using 1 3 1 200 'City from'(003).
      perform fill_cell using 1 4 1 200 'City to'(004).
      perform fill_cell using 1 5 1 200 'Dep. Time'(005).
      loop at it_spfli.
    copy flights to active EXCEL sheet
        h = sy-tabix + 1.
        if it_spfli-carrid cs 'AA'.
          perform fill_cell using h 1 0 000255000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'AZ'.
          perform fill_cell using h 1 0 168000000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'JL'.
          perform fill_cell using h 1 0 168168000 it_spfli-carrid.
        elseif it_spfli-carrid cs 'LH'.
          perform fill_cell using h 1 0 111111111 it_spfli-carrid.
        elseif it_spfli-carrid cs 'SQ'.
          perform fill_cell using h 1 0 100100100 it_spfli-carrid.
        else.
          perform fill_cell using h 1 0 000145000 it_spfli-carrid.
        endif.
        if it_spfli-connid lt 400.
          perform fill_cell using h 2 0 255000255 it_spfli-connid.
        elseif it_spfli-connid lt 800.
          perform fill_cell using h 2 0 077099088 it_spfli-connid.
        else.
          perform fill_cell using h 2 0 246156138 it_spfli-connid.
        endif.
        if it_spfli-cityfrom cp 'S*'.
          perform fill_cell using h 3 0 155155155 it_spfli-cityfrom.
        elseif it_spfli-cityfrom cp 'N*'.
          perform fill_cell using h 3 0 189111222 it_spfli-cityfrom.
        else.
          perform fill_cell using h 3 0 111230222 it_spfli-cityfrom.
        endif.
        if it_spfli-cityto cp 'S*'.
          perform fill_cell using h 4 0 200200200 it_spfli-cityto.
        elseif it_spfli-cityto cp 'N*'.
          perform fill_cell using h 4 0 000111222 it_spfli-cityto.
        else.
          perform fill_cell using h 4 0 130230230 it_spfli-cityto.
        endif.
        if it_spfli-deptime lt '020000'.
          perform fill_cell using h 5 0 145145145 it_spfli-deptime.
        elseif it_spfli-deptime lt '120000' .
          perform fill_cell using h 5 0 015215205 it_spfli-deptime.
        elseif it_spfli-deptime lt '180000' .
          perform fill_cell using h 5 0 000215205 it_spfli-deptime.
        else.
          perform fill_cell using h 5 0 115115105 it_spfli-deptime.
        endif.
      endloop.
    EXCEL FILENAME
      CONCATENATE SY-REPID '_' SY-DATUM6(2) '_' SY-DATUM4(2) '_'
                  SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
      CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
      free object h_excel.
      perform err_hdl.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    form fill_cell using i j bold col val.
      call method of h_excel 'Cells' = h_zl
        exporting
          #1 = i
          #2 = j.
      perform err_hdl.
      set property of h_zl 'Value' = val .
      perform err_hdl.
      get property of h_zl 'Font' = h_f.
      perform err_hdl.
      set property of h_f 'Bold' = bold .
      perform err_hdl.
      set property of h_f 'Color' = col.
      perform err_hdl.
    endform.                    "FILL_CELL
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    form err_hdl.
      if sy-subrc <> 0.
        write: / 'OLE-Automation Error:'(010), sy-subrc.
        stop.
      endif.
    endform.                    " ERR_HDL
    Good Luck and thanks
    AK

  • Problem while downloading the alv output to excel file.

    Hii,
    While downloading the alv output to an excel file i am facing a problem. Either the output comes as 1.23456E+11 or the values get cut .
    Cant put in txt file  as the users require to calculate directy and i have even tried to increase the output length .But both doesnt help.
    So what are the other ways to do so.
    Edited by: mansi_v27 on Mar 24, 2010 12:35 PM

    Hi,
    Welcome to SCN!!!.
    Please go through the forum rules. This has been discussed many times. You can search in the forum for this.
    Infact there is no problem. Just expand that excel cell. You can see the full value. This is standard excel property.
    Thanks,
    Vinod.

  • Regarding ALV output  to Excel file download

    Hi all,
    i had a requirement when downloading the ALV output to the Excel file it should ask for the password.if the user enters the password then this pass word shuld be assigned to the  Excel file that was downloaded.
    Can i know how this can be implemented

    Hi,
    Using EXCEL_OLE_STANDARD_DAT you can specify the PASSWORD & PASSWORD OPTION.
    Regards,
    Sharat

  • Open an excel file in a jsp

    using apache poi excel, i created a workbook and add that into the season and opened in new jsp by servletoutputstream(these are happening at onclick).
    first time it's working fine,
    if i try do it again without closing this jsp, I am getting the same results in the previous jsp.But this works fine if i close the the jsp and do that.
    regards
    Senthil Arjunan

    duffymo wrote:
    SoulTech2012 wrote:
    duffymo wrote:
    That's fine, but you can serve up an Excel file (for download) with a couple lines of code. That doesn't require Spring. Too often I see these noobs working on a web project and throwing half a dozen frameworks at it because people told them to or recommended them. Noobs don't often know better and I have no doubt that some of them would attempt to use Spring just to get an Excel file to download if they were told to. But then again, that's their problem I guess.You win. What did I win?The debate, of course.
    Do you realize how often this question is asked and how many times the code has been posted?! No, which is why I asked. Please post them just one more time.Nobody likes a smart@ss. I seriously doubt, as much time as you spend here, that you truly believe that. Yes, I'm calling you a liar.
    >
    Besides, I have no interest in helping to set a precident that there's no need to do any research when you can simply ask for a handout here. Posting the code, or not, is still a better response than recommending Spring.Fine. Post the code.
    %knock yourself out!
    in 60 seconds I found a half dozen posts of the same exact code
    http://search.sun.com/search/onesearch/index.jsp?qt=download+excel+file&rfsubcat=&col=developer-forums&cs=false&rt=true&reslang=en

  • Problem with opening MS Excel files through Portal

    Hi All,
    I have a user that is complaining about the behaviour of MS Excel files in the Portal. The MS Excel files do not match their behaviour at the windows level. The issue has to do with how MS Excel files never seem to open in a maximized sate when you open them from the portal. The same cannot be said about MS Word files. The behaviour of MS word files is consistent between windows and portal.
    Solutions will be REWARDED.
    Thanks & Regards,
    Krishnen Subramanian.

    Hi Hussain,
    I hav uploaded the excel file into my KM contentafter that when i try to open it , it does not open as maximized.
    Let me explain:
    I create a new excel file on my desktop:
    I open this file:
    I maximize the workbook and save:
    I close Excel and then open the file right back up:
    I notice that Excel and the workbook open up maximized. I close Excel again.
    I now upload the file to the portal:
    I then open the file from here:
    It is noticed that the Excel is not maximized. We would like for it to behave as it does from the desktop. In other words, if it is saved as maximized, it should open from the portal that way. If it is saved as half way open, it should open that way from the portal.
    I have found that MS Word documents behave in the portal as they do on the desktop. I create an MS Word file on my desktop:
    There appears to be something portal related that prevents MS Excel files from opening maximized.
    Hope you will be abl to solve the message.
    Thanks & Regards,
    Krishnen Subramanian.

Maybe you are looking for

  • Mail won't open after yosemite update

    I updated my macbook pro last night to the yosemite version 10.10.3 and my mail app won't open anymore and i get the following message: "The last time you opened Mail, it unexpectedly quit while reopening windows. Do you want to try to reopen its win

  • Passing data through parameters or return?

    Here are too samples: void doStuff (String s) void String doStuff() }they both pass a String to the caller, but I found they are totally different. Can anyone give me some idea about it?

  • Unable to verify message signature

    1 - I am using Lion and some emails come with a signature and it appears a message on top of the message saying: "Unable to verify message signature" (here in attach). What should i do? 2 - I would like to use digital signature for my emails. What co

  • WLS7.0 client invoke Webservices in WLS9.2?

    Dear All, I am new to Web Services in WLS. I have a SWING program which connecting to weblogic7.0 now. It needs to invoke a web services that host in weblogic9.2. So I need the weblogic.jar of two different versions for that SWING client program . Is

  • Re: Quality Certificate requirement At MIGO for raw material

    Dear all, I have a requirement where I want the system ask for Quality certificate while doing the goods receipt. The system should not allow me to process the transaction-MIGO if certificate is not recieved. Please advice Regards, Vivek Sharma