Error Exporting Table Content into Excel

Hi there,
I have code that reads a TableView and exports its content into excel file. The code is running right now in an iView that is stored in a protal role. The code has been developed using PDK. I'm running portal 6.0 SP16.
Here is what the code does:
1. Reads the content of the table and stores it in an HSSFSheet inside an HSSFWorkbooK object.
2. Gets HttpServletResponse from the portal request and updates its content type and headers
HttpServletResponse response = ((IPortalComponentRequest)getRequest()).getServletResponse(true);
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachement;filename="EmployeeEntitlementRpt.xls"");
3. Writes the excel file to the response output stream.
ServletOutputStream fileOut = null;
try{
     fileOut = response.getOutputStream();
     wb.write(fileOut);
     fileOut.close();
} catch(IOException ie){
     throw new PortalRuntimeException("IOException when getting output steam from response, writing to the outputstream or closing it.", ie);
The code gives me the following error message, if invoked from the iview inside the detailed navigation.
<b>"Internet Explorer cannot download ...ge!2fcom.sap.portal.innerpage from portald.global.ad
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."</b>
However, when I navigate to the same iView and open it in a new window, the code functions as expected.
This is the URL to the iView when opened inside the detailed navigation: https://companyserver.global.ad/irj/servlet/prt/portal/prtpos/pcd!253aportal!255fcontent!252fevery!255fuser!252fgeneral!252fdefaultDesktop!252fframeworkPages!252fframeworkpage!252fcom!252esap!252eportal!252einnerpage!7b!3b2!7d.com!252esap!252eportal!252edynamicNavigationArea!7bHideMode!7d_com!252esap!252eportal!252etargetsiView!7bHideMode!7d_com!252esap!252eportal!252etargetsiView!255f!7bHideMode!7d-/prttarget/com!252enexeninc!252etots!252eiv_entitlement_report.content/prteventname/HtmlbEvent/prtroot/pcd!3aportal_content!2fevery_user!2fgeneral!2fdefaultDesktop!2fframeworkPages!2fframeworkpage!2fcom.sap.portal.innerpage
This is the URL to the iView when opened in a new window:
https://companyserver.global.ad/irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.iviewmodeproxy?iview_id=pcd%3aportal_content/com.nexeninc.fld_nexen_content/fld_all_users/fld_time_off_tracking/fld_administrators/com.nexeninc.tots.ro_administrator/com.nexeninc.tots.ws_user_components/com.nexeninc.portal.navigation.ws_my_workspace_my_applications/com.nexeninc.portal.navigation.ws_my_workspace/fld_general_applications/fld_track_time_off/fld_admin/com.nexeninc.tots.iv_entitlement_report&iview_mode=default

Hi,
In the iView properties, for the property Entry Point, mark the property as yes instead of the default no. May be this could help u.
Regards,
Sujana

Similar Messages

  • 500 internal server error while Export wedbdynpro content into Excel.

    Hi Experts,
    my requirement is export webdynpro content into excel sheet, so for this what i have did is
    First step:
    ) created an Extneral library DC
    2) imported the JARs to the libraries folder of the External Library DC project
    3) Right-click on each of the JARs imported to the project and added them to the public part.
    Second step:
    1) Createed a new Reuse Web Dynpro DC
    2) Created a new public part, selecting the "Can be packaged into other build results" option
    3) extrcted the full content (folders and class files) to root folder
    4) Imported the folders and files to the src/packages folder
    5)binded the attributes, created 3 methods and writen the code for those methods.
    Third Step:
    1) created one more EXPORT EXCEL DC
    2) ADDED LIB jar dc and Reuse DC IN used dc's
    3) created usedwebdynpo component and binded attributes to Table VIEW and writen the code for exposing table values.
    After this build and deployed i am getting clasnot found error
    so what i have did now is
    Fourth step:
    1)Created "J2EE Library DC"
    2) Refered "External Library DC" into J2EE Library DC.
    3) Deployed "J2EE Library DC"
    4) Refered this one in my Web Dynpro DC by giving Library Reference.
    now when i deploy and run what happend i am getting
    500 Internal Server Error SAP J2EE Engine/7.01 
    Application error occurred during request processing.
    Details:   com.sap.tc.webdynpro.services.sal.core.DispatcherException: Failed to start deployable object sap.com/export_file_excel_7.
    Exception id: [00215E78C4C0006D00000AD9000E00F00004887F642A32FE]
    Any one can tell what could be the problem.

    Thanks for sharing the solution.

  • How to write table content into excel quickly?

    Dear gurus, I am fresh to ABAP, could you please so kind advise how can I save a table content into an excel which is stored in certain path efficiently?
    I found a way as following:
    form excel_range_write using lcobj_excel
                                 lc_range
                                 lc_value.
      data: lc_cell type ole2_object.
      call method of
          lcobj_excel
          'RANGE'     = lc_cell
        exporting
          #1          = lc_range.
      perform font using lc_cell 1 '30'.
      set property of lc_cell 'VALUE' = lc_value.
    endform.                    "excel_cell_write
    However if I would like to write everything out, I have to loop the table to fill each cell, is there any easier way? Could anyone kindly help?

    hi Frank
    this is the wiki published by me
    hope it will help u a lot
    https://wiki.sdn.sap.com/wiki/display/Snippets/OLEprogramforconvertingtomultitabexcel
    cheers
    s.janagar

  • Http 404 error exporting query result into Excel.

    Hello. I'm getting an Http 404 The webpage cannot be found" error when trying to export any APEX application's query results into Excel (Application Express 3.2.1.00.10). This was working fine before. Nothing changed with our APEX application. I've been always using I.E. Version 7.0.5730.11 with no problems. I've reset the I.E. defaults and still the problem exists. I've downloaded Mozilla Firefox and the problem does not happen. However, I would like to know why my I.E. still gets this error? Any feedback or suggestions would greatly be appreciated. Thanks for your time.

    My EI settings are as follows:
    Tools -> Internet Options -> Security
    All Three: Internet, Local Intrarnet, and Trusted Sites ... at Custom Level have the following settings:
    Downloads:
    Automatic prompting for file downloads = Enable
    File download = Enable
    Font download = Enable
    Problem still exists.
    Thanks for the help.... any additional feedback or suggestions would greatly be appreciated. Thanks for your time.

  • ADF: Export table contents to pdf

    Hi Everyone,
    I am using Jdev 11G...
    I have a table and Export to Excel button on the adf page.Export to Excel is working fine.
    But now i have to change it to Export to pdf.
    Plz let me know how can i perform this operation Export table contents to Pdf.
    Plz give me any simple solution for achieving this.
    Any answers will be really useful.
    Thanks...

    Hi Timo,
    Thanks for ur response.
    i modified that import.
    now when i compile im getting error for AppModuleImpl import.
    Error(338,12): cannot find class AppModuleImpl.
    And also plz specify from where i can get that .xml file which is specified in private static void printXML(Node n) throws IOException { ) method. (which xml file is that).(i didnt find any xml file when i check in my path)
    And also the paths in public void generatePDF() {
    File xmlfile =
    new File("C:/jdevstudio10133/jdev/mywork/FOP/ViewController/src/view/emp.xml");
    File xsltfile =
    new File("C:/jdevstudio10133/jdev/mywork/FOP/ViewController/src/view/emp.xsl");
    File pdffile =
    new File("C:/jdevstudio10133/jdev/mywork/FOP/ViewController/src/view/EmpResultXML2PDF.pdf");
    Is these 3 paths are alreasy exists or we are creating it now?
    Plz clarify me im confused.....
    Thanks.

  • How to Export SSRS report into Excel format using query string

    Hello all,
    I am new to SSRS world.
    Last night i was trying to add a hyperlink  on the SSRS report (.rdl) file, by clicking which we can export the report into "Excel" format, but with no luck.
    Can anybody tell me how to form the hyperlink, so that we can export the report with its current content ( I mean the report content generated by selecting some parameter values)

    Hi Suman85,
    Based on your scenario, you want to add a link on the SSRS report file, and then click it you can export the report into “Excel” format.
    Just as kishan1901 said , you can add a textbox to your report and type in the words “Click here and export the report
    to excel” .Then right-click the textbox and select Properties. Switch to Navigation tab, click the radiobutton of ‘Jump to URL’ and type in the expression ,here is just a example:
     ="http://vyof1884200/ReportServer$youhoo?/My+Adventure+Works/Product+Sales+and+Profitability+by+Month&rs:Command=Render&rs:Format=excel"
    Then preview the report ,you will see
    Click here and export the report to excel 
    when you move the mouse to it ,the mouse will become a hand ,then left-click, it will jump out a dialog box to indicate user whether the excel file should be saved , opened or canceled. 
    I think this is what you want, if you have any further requirement, could you please describe it in more detail? We would give you some resolution or workaround.
    Regards,
    Challen Foo

  • How to export report output into excel.

    Hi all
    how to export report output into excel sheet can any on give me answer step by step please as soon as possible
    kk

    Hi Prashanth,
    If you are executing Query from WAD  ---> Right click on Table (only on Characteristics Data)  --> Enhanced Menu ---> Export as --> CSV file or MS Excel
    assign points if this helps,
    Thanks,
    Sudhakar

  • Exporting table data to Excel sheet:

    Hi All
    My requirement is need to export table data to Excel sheet: for this
    I was done all, but I'm getting 500 Exception please contact u r system admin msg at run time, also Jxl/Workbook class not found msg but I downloaded Jxl.jar file and its showing in navigator>Lib>jxl.jar. There is no error signals in coding part.
    Thanks
    Polaka

    Hi,
    Copy your jxl.jar and open it with winzip. See if there is Workbook.class file inside it in the folder jxl.
    Try to download jxl.jar from this link
    http://www.java2s.com/Code/Jar/JKL/Downloadjxljar.htm
    and add.
    Best Wishes
    Idhaya R

  • Export Custom List into Excel through custom Ribbon

    Hi i have a requirement, in that i need to export custom list into EXCEL through custom Ribbon. For Example in my list, i have Col1, Col2, Col3. Col3 has multiple values (allow mutiple values) and when export this into excel all values in Col3 should
    come as new rows and rest of the column values should duplicate. please helpout from this requirement.
    List View
    Col1   Col2      Col3
    v1        v2    v31,v32,v33
    Excel View
    Col1  Col2  Col3
    v1      v2      v31
    v1      v2      v32
    v1      v2      v33
    Nihath

    Hello Nihath,
    As per your description, you have to read each and every items in list with column value then only you can generate excel. There is direct way to export datatable to excel but in your case you will also need to iterate Col3 value to create new row in excel.
    I would suggest to use CAML query to get all items then check Col3 value. If there are multiple value then add them as new datatable row and finally export full datatable to excel.
    Here is link for CAML:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.listitemcollectionposition.aspx
    Export datatable to excel:
    http://stackoverflow.com/questions/12533626/export-datatable-to-excel
    Finally add this feature in ribbon:
    http://ankurmadaan.blogspot.in/2012/10/custom-ribbon-action-for-specific-list.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • What's the best way to export UTF8 data into Excel?

    Hi,
    Database charterer set is UTF8
         PARAMETER     VALUE
    1     NLS_NCHAR_CHARACTERSET UTF8
    2     NLS_CHARACTERSET     UTF8
    My requirement is that I want to export oracle data into excel file by using UTL_FILE oracle supplied package.
    But while writing data into excel files it’s looses in UTF8 encoding and writes some garbage data into file.
    I am very much sure that while retrieving the data form database it is perfectly encoded with UTF8, but after data is written to the file it eats the UTF encoding resulting into some garbage data.
    e.g.
    I am retrieving this filed from database which is UTF8 encoded in DB “Langäcker 55” but when it is written into excel it becomes “Langäcker 55”.
    Is Oracle UTL_FILE eating the UTF8 encoding while writing into file? if yes, is there utility which can help me to remain the UTF8 encoding as it is while writing in to excel file? Is there anythingi can do in Oracle to get this done?
    Thanks in advance.
    Thanks,
    Santosh

    Until now I have not found anyone who could write real Excel files (MS binary format) in PL/SQL. So I assume that you write your data in strings separated by a character like ; or |, aka CSV.
    Try to open your file with 'wb' (write binary) instead of 'w' and then use
    -- write data
    utl_file.put_raw(v_file,utl_raw.cast_to_raw(<your data>));
    --write remaining data
    utl_file.fflush(v_file);
    --close the file
    utl_file.fclose(v_file);Regards
    Marcus

  • In new Numbers, can you export a file into excel format?

    In new Numbers, can you export a file into excel format? Or is this something else thats been removed!!??
    HELP!!

    Hi AMGracie,
    In Numbers 3.0 on a MacBook Pro running OS X 10.9
    Regards,
    Ian.

  • Download database table content into internal table using Function Module?

    HI,
    Experts,
    I need a function module which can download ddic table content into internal table.
    Thank u ,
    Shabeer Ahmed.

    >
    shabeer ahmed wrote:
    > HI,
    > Experts,
    >
    > I need a function module which can download ddic table content into internal table.
    >
    > Thank u ,
    > Shabeer Ahmed.
    Hi Shabeer,
      We don't require a function module to download ddic table content to an internal table. We can use the SELECT statement for the same. Example would be:-
    DATA: <INTERNAL TABLE> type table of <DATABASE>.
    SELECT * FROM <DATABASE> into corresponding fields of <INTERNAL TABLE>.
    Also, function module might be required when you need the data from a remote system, but then it is the developer's task create this function module and the function module should be remote enabled function module.
    This remote enable function module should have the above SELECT query as its code.
    Many Regards,
    Ravi.

  • How to export table data to excel in albpm

    Hi,
    we have an requirement to export table data to excel .
    we have to create an jsp in that jsp we have to have text fileds,we have to enter data to field after that we have to click on save once u click on save that data has to enter in below table and we should provide link to export that table data to excel.
    this is our totatl requirement.can u please suggest me how to do,i dont have any idea..
    Regards,
    Sharmila
    Edited by: user12171025 on Nov 5, 2009 8:44 PM

    Hi Daniel 
    Please have a look at below docs :-
    /people/subramanian.venkateswaran2/blog/2006/08/16/exporting-table-data-to-ms-excel-sheetenhanced-web-dynpro-binary-cache
    http://wiki.sdn.sap.com/wiki/display/WDJava/ExporttoExcel(WithoutthirdpartyAPIs)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d01854fd-1579-2c10-63ad-dd62edca2381?quicklink=index&overridelayout=true
    Regards
    Arun Jaiswal

  • Exporting table data to Excel

    Hello, i use af:exportCollectionActionListener component to export table data to Excel.
    there are 100 000 rows in my table. But only 65 535(may be is consilience that ushort = 0 to 65535) rows was exported.
    what are problems? Anybody know?
    Edited by: Beliansky Alexander on Sep 5, 2012 7:02 AM

    If i am not wrong thats a limit of excel. Not sure but.Google
    taken from "http://msdn.microsoft.com/en-us/library/office/ff700514.aspx"
    "Starting in Excel 2007, the "Big Grid" increases the maximum number of rows per worksheet from 65,536 to over 1 million, and the number of columns from 256 (IV) to 16,384 (XFD). "
    Edited by: in the line of fire on Sep 5, 2012 6:06 PM

  • How we export report data into excel in report 10g

    hi can any one tell me
    how we export report data into excel in report 10g (except spreadsheet)

    We can use TEXT_IO Package

Maybe you are looking for

  • IChat video chat not working between two iMacs running OSX Leopard 10.5.1

    My mother in law just got a 20" iMac (metal) and is connected to her wireless router. I tried doing a video iChat with her, and it is not working. I am able to successfully test iChat with the three apple iChat test AIM buddy accounts.

  • When will wls try to garbage collect ?

    The docs for the option "Low memory GC threshold" say that this is the "Threshold level at which WLS will try to garbage collect once the granularity report has been met". My question is: When is this condition met ? If at least once there has been a

  • To find whether current user has SAP_ALL profile or not.

    Hi all, Can anyone tell me that whether is there any method by which I can pass the user id and can know whether that user has the SAP_ALL profile or not. The above is done by using the transaction SU01,but I need the ABAP code that is being used in

  • 6 in 1 card Reader not found after installing Windows 8 - HP Pavillion Dv6

    I am running a dv6874ca and after installing Windows 8 the 6 in 1 card reader no longer works - the system does not read any information. I cannot find the card reader in the device manager.  Note: I am trying to view a Sony Pro Duo card which was po

  • Does airport express support guest network

    i have a client with an airport extreme (802.11n/4th gen) and an airport express (802.11n/1st gen). the express is located in an outbuilding, connected to the extreme via powerline adaptors, and configured as wds (that is,  the express broadcasts the