Export data to excel from oracle ?

Hi,
Is it possible to export the table data to an excel sheet??? If yes, please let me know how to achieve it !!!
Regards
Venkat

Numerous threads about this issue....
Just a pair of example...
Export from oracle to excel
Export Data to Excel using PL/SQL
If you were not satisfied ... , you could search extensively the forums:
http://forums.oracle.com/forums/search.jspa?threadID=&q=export+data+to+excel&objID=f75&dateRange=lastyear&userID=&numResults=15
Greetings...
Sim

Similar Messages

  • Export Data To Excel From DVWP

    Hi,
    I created DVWP in SPD.
    Is it possible to Export Data To Excel From DVWP?
    What should I do?
    Thanks in advance!

    Hello,
    try this:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c2e2eb0c-202e-49c1-80cb-2fbf5159b10c/how-to-export-dataview-webpart-to-an-excel-file?forum=sharepointcustomizationprevious
    Via script:
    http://ameyakawale.wordpress.com/2011/08/04/exporting-dataview-webpart-data-into-excel-using-javascript/
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/e01ed0bb-63bc-49fc-b1ff-5d2342f897ae/exporting-data-view-webpart-to-excel-spreadsheet?forum=sharepointcustomizationprevious
    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

  • Export data into Excel from PL/SQL Block

    Hi,
    Please tell me how to export data into excel comming out from PL/SQL code in APEX.
    We can simply export data into excel if we have Report region, but my query is dynamic for which i had to use PL/SQL block. Now i want to export that data into excel.
    Thanks & Regards,
    Smith

    Hi,
    Take a look here http://spendolini.blogspot.com/2006/04/custom-export-to-csv.html
    Regards
    Paul

  • How export data in Excel From Visual Composer

    Hay everybody,
    I would like to export my data result from Visual Composer to Excel. I've tried with an export data buton, but the exported file has a very bad format in Excel. I've tried an hyperlink buton which contain the Reptname data of the query too, but I can't keep my filters. This second solution can be nice for the format. If anyone knows how I can keep my filters, I would be fine.
    Thanks

    I did not get solution by using BW 3.5 , can we export data to Excel ? I am refering
    [HOW TO EXPORT DATA FROM VISUAL COMPOSER|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123?overridelayout=true] following link??

  • Export data to excel from jsf

    How can I export data to excel sheet using jsf ..Any components available..
    Thanks in advance.

    There is no JSF component which does all the task, but there are enough ways to achieve this. You can use a reporting framework, such as JasperReports or BIRT. You can use a Java Excel API, such as Apache POI HSSF or Andy Khan's JExcelAPI. You can write a plain vanilla CSV or HTML TABLE file which can also be read by Excel.

  • Problems in exporting data to Excel from WebDynpro

    Hi,
    I'm trying to transport data to Excel using the WebDynpro Binary Cache. The table data I have has certain special characters like & , < and > . I get an XML Parse error while trying to retrieve the XML List from the Binary Cache. The detailed error is Whitespace is not allowed. If table data is without these special characters Excel Export happens fine.
    Any help is highly appreciated.
    Thanks,
    Bala

    I got the same error message and find the solution (knowing that this is an old thread, but maybe in future it can helps someone)
    I've changed my TableUtilities class (getting from this excellent blog: /people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities), adding the CDATA Element
    Method: DownloadToExcel
    for (int j = 0;j<columnInfos.size();j++)
                             String attributeName = (String)columnInfos.get(j);
                             xml_file.append("<")
                                       .append(attributeName)
                                       .append(">")
                                       .append("<![CDATA[")
                                       .append(elem.getAttributeValue(attributeName))
                                       .append("]]>")
                                       .append("</")
                                       .append(attributeName)
                                       .append(">\n");
                        xml_file.append("</")
                                  .append(_nodename)
                                  .append("Element>\n");

  • EXPORT DATA TO EXCEL FROM PORTAL

    HELLO
    user has saved one of the web reports in his favourites...he has customized the report according to his needs and then saved it in his favourites...now when he acesses the report from his favourites and..
    enters the values for the variables
    the data is displyed accordinly as he customized it.
    now when he wants to export this data to excel he is getting the error.
    contact ur system admin..ur request cannot be processed.
    it is not happening with any of his other reports.its only this one he is not able to export the data.
    please suggest what steps can be taken

    yea the reports worked fine...it is only this report which is not exporting data...he is able to view all the data and everything in portal for this report but when he exports to excel he is getting this error.
    cannot find advanced load with uid:FILTER_PANE_ac_unid0_dropdown
    i tried with the oss notes but nothing..
    this is not an authorization issue as the user is able to acess the report.it is only that he is not able to export to excel..
    please let me know what can i do..
    thanks

  • Sending data to EXCEL from Oracle Forms 6.0 URGENT!!!!!

    Dear all,
    I have a problem to which I hope to get a solution from anyone
    out there...
    The problem is as follows:
    I have a form that contains some data. Now this data I need to
    transfer to an excell sheet. I tried to do so through report
    builder (6.0) but every time I try to convert my report I get a
    general protection fault. So instead I'm sending the data to a
    text file through text_io built in then reopening the text file
    from excel. Isn't there a better way to do it? ie sending the
    data stright from forms to excel?
    Thanks in advance
    null

    TRY THIS OUT....OLE2.... IT WORKS GREAT...DIRECTLY TO EXCEL...
    Oracle Corporate Support
    Problem Repository
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    Problem ID : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: OLE AUTOMATION NO LONGER WORKS AFTER UPGRADE TO OFFICE97
    +=+
    Problem Description:
    ====================
    You have upgraded to Microsoft Office97 and OLE calls in your
    Developer/2000
    applications no longer work.
    Problem Explanation:
    ====================
    Examples:
    You are using Forms to send data to a Microsoft Word document
    and print
    letters, using ole automation. This worked fine with Word 6.0,
    but when
    they
    upgraded to Word 8.0 (Office97), the letters do not get printed.
    When you try to get an object handle to the Excel97 Workbooks
    collection
    using
    the OLE2 Package, you get the following error:
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    The Same code works fine against Excel 7.0.
    [ Search Words: Office 97 msoffice ms office object linking and
    embedding
    application get_obj_property workbook invoke_obj
    appshow
    upgrade upgrading bug483090 olex.rdf demo ]
    +==+
    Diagnostics and References:
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    Solution ID : 2077481.6
    For Problem : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: MICROSOFT CHANGED OLE INTERFACE FOR OFFICE97
    +=+
    Solution Description:
    =====================
    WORD:
    Microsoft made some changes in the upgraded version of Word
    which cause it
    to
    come up as a hidden application. Customer had to add "AppShow"
    to his code,
    and ole automation works fine now.
    EXCEL:
    The issue here is that Microsoft changed the object "Workbooks",
    which is
    now
    a property of object "Excel.Application". So, replace the call:
    workbooks := ole2.invoke_obj(application, 'workbooks');
    with
    workbooks := ole2.get_obj_property(application, 'workbooks');
    For example:
    PACKAGE BODY olewrap IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    procedure init is
    begin
    -- Start Excel and make it visible
    application := OLE2.CREATE_OBJ('Excel.Application');
    ole2.set_property(application,'Visible', 'True');
    workbooks := OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'c:\test\ms\excel\test.xls');
    workbook := OLE2.GET_OBJ_PROPERTY(workbooks, 'Open', args);
    OLE2.DESTROY_ARGLIST(args);
    worksheets := OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    worksheet := OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    -- Return object handle to cell A1 on the new Worksheet
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    OLE2.ADD_ARG(args, 1);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'Hello Excel!'
    OLE2.SET_PROPERTY(cell, 'Value', 'Hello Excel!');
    END;
    procedure addstuff is
    BEGIN
    -- Return object handle to cell A1 on the new Worksheet
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 2);
    OLE2.ADD_ARG(args, 2);
    cell:=OLE2.INVOKE_OBJ(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'This is the added stuff'
    OLE2.SET_PROPERTY(cell, 'Value', 'This is the added stuff');
    END;
    procedure stop is
    begin
    -- Release the OLE objects
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'C:\OLETEST2.XLS');
    OLE2.INVOKE(worksheet, 'SaveAs', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.RELEASE_OBJ(cell);
    OLE2.RELEASE_OBJ(worksheet);
    OLE2.RELEASE_OBJ(worksheets);
    OLE2.RELEASE_OBJ(workbook);
    OLE2.RELEASE_OBJ(workbooks);
    OLE2.RELEASE_OBJ(application);
    END;
    Solution Explanation:
    =====================
    Microsoft changed some of the OLE calling interfaces for the
    Office97
    products. Thus, some of your existing OLE calls may need to be
    changed to
    comply with the Office97 interface.
    Consult with Microsoft and your Office97 documentation or more
    information
    on
    what the OLE interface is for the Office97 suite of products.
    Additional Information:
    =======================
    Related Bugs:
    483090 (Closed, Vendor OS Problem)
    FORM GIVES FRM-40735: UNHANDLED EXCEPTION ORA-305500 AGAINST
    EXCEL97.OFMPE0497
    +==+
    References:
    ref: {8192.4} BUG-483090
    Oracle Corporate Support
    Problem Repository
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    1. Prob# 1030046.6 NEW: OLE AUTOMATION NO LONGER WORKS AFTER
    UPGRADE TO OF
    Problem ID : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: OLE AUTOMATION NO LONGER WORKS AFTER UPGRADE TO OFFICE97
    +=+
    Problem Description:
    ====================
    You have upgraded to Microsoft Office97 and OLE calls in your
    Developer/2000
    applications no longer work.
    Problem Explanation:
    ====================
    Examples:
    You are using Forms to send data to a Microsoft Word document
    and print
    letters, using ole automation. This worked fine with Word 6.0,
    but when
    they
    upgraded to Word 8.0 (Office97), the letters do not get printed.
    When you try to get an object handle to the Excel97 Workbooks
    collection
    using
    the OLE2 Package, you get the following error:
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception
    ORA-305500
    The Same code works fine against Excel 7.0.
    [ Search Words: Office 97 msoffice ms office object linking and
    embedding
    application get_obj_property workbook invoke_obj
    appshow
    upgrade upgrading bug483090 olex.rdf demo ]
    +==+
    Diagnostics and References:
    2. Soln# 2077481.6 NEW: MICROSOFT CHANGED OLE INTERFACE FOR
    OFFICE97
    Solution ID : 2077481.6
    For Problem : 1030046.6
    Affected Platforms : MS Windows 95
    MS Windows NT
    Affected Products : SQL*Forms
    Oracle Reports
    Oracle Graphics
    Oracle Developer/2000
    Affected Components : SF40 V04.05.XX
    SQLREP V02.05.XX
    ORAGRAPH V02.05.XX
    DEV2K Generic
    Affected Oracle Vsn : Generic
    Summary:
    NEW: MICROSOFT CHANGED OLE INTERFACE FOR OFFICE97
    +=+
    Solution Description:
    =====================
    WORD:
    Microsoft made some changes in the upgraded version of Word
    which cause it
    to
    come up as a hidden application. Customer had to add "AppShow"
    to his code,
    and ole automation works fine now.
    EXCEL:
    The issue here is that Microsoft changed the object "Workbooks",
    which is
    now
    a property of object "Excel.Application". So, replace the call:
    workbooks := ole2.invoke_obj(application, 'workbooks');
    with
    workbooks := ole2.get_obj_property(application, 'workbooks');
    For example:
    PACKAGE BODY olewrap IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    procedure init is
    begin
    -- Start Excel and make it visible
    application := OLE2.CREATE_OBJ('Excel.Application');
    ole2.set_property(application,'Visible', 'True');
    workbooks := OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'c:\test\ms\excel\test.xls');
    workbook := OLE2.GET_OBJ_PROPERTY(workbooks, 'Open', args);
    OLE2.DESTROY_ARGLIST(args);
    worksheets := OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    worksheet := OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    -- Return object handle to cell A1 on the new Worksheet
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    OLE2.ADD_ARG(args, 1);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'Hello Excel!'
    OLE2.SET_PROPERTY(cell, 'Value', 'Hello Excel!');
    END;
    procedure addstuff is
    BEGIN
    -- Return object handle to cell A1 on the new Worksheet
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 2);
    OLE2.ADD_ARG(args, 2);
    cell:=OLE2.INVOKE_OBJ(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    -- Set the contents of the cell to 'This is the added stuff'
    OLE2.SET_PROPERTY(cell, 'Value', 'This is the added stuff');
    END;
    procedure stop is
    begin
    -- Release the OLE objects
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'C:\OLETEST2.XLS');
    OLE2.INVOKE(worksheet, 'SaveAs', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.RELEASE_OBJ(cell);
    OLE2.RELEASE_OBJ(worksheet);
    OLE2.RELEASE_OBJ(worksheets);
    OLE2.RELEASE_OBJ(workbook);
    OLE2.RELEASE_OBJ(workbooks);
    OLE2.RELEASE_OBJ(application);
    END;
    Solution Explanation:
    =====================
    Microsoft changed some of the OLE calling interfaces for the
    Office97
    products. Thus, some of your existing OLE calls may need to be
    changed to
    comply with the Office97 interface.
    Consult with Microsoft and your Office97 documentation or more
    information
    on
    what the OLE interface is for the Office97 suite of products.
    Additional Information:
    =======================
    Related Bugs:
    483090 (Closed, Vendor OS Problem)
    FORM GIVES FRM-40735: UNHANDLED EXCEPTION ORA-305500 AGAINST
    EXCEL97.OFMPE0497
    +==+
    References:
    ref: {8192.4} BUG-483090
    null

  • Date issue when exporting data to Excel from SSRS report, where date is less than 1/1/1900

    Hi,
    I am using SSRS report to display the data from database. In that data, One of the column is DATE. when I am exporting to Excel all that dates are displaying fine except 1/1/1800 12:00 AM. Instead of 1/1/1800 12:00 AM it is displaying XXXXXXXXXXXXXX values.
    Please help me to fix the issue.
    Please let me know if more clarification required.
    Thanks In advance.

    Hello,
    We can use Cstr() function to convert the Date type data to String data. Suppose we have a field named DateTime, please refer to the expression below:
    =Cstr(Fields!DateTime.Value)
    Then we can get a string type data. There is an article about SSRS expression, you can refer to it.
    http://msdn.microsoft.com/en-us/library/ms157328.aspx
    If you have any questions, please feel free to let me know.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Export data to excel from table

    Hi experts,
    Scenario: I have a table which is mapped to a context node consisting of 6 attributes. Here I want to add a new button to the application to export all the data comming in the table to an excel sheet. How can i achieve this scenario. I need the least complicated and the shortest method(code) to implement the same.
    Please help me with this.
    Regards,
    KM

    Hi KM,
    Please refer to below documents :
    https://wiki.sdn.sap.com/wiki/label/excel
    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
    Regarding Download data in MS Excel format and Check box
    Hope it helps
    Regards
    Arun

  • Export Data to excel from JSP

    Hi Friends,
    I want to generate a excel file on click of a button storing the report whose content are based on some sql query. I got following code from the group.
    <%@ page language="java" import="java.io.*" %>
    <%@ page contentType="application/vnd.ms-excel" %>
    <%
    response.setHeader("Content-Disposition","attachment;filename=Test.xls");
    %>
    <html>
    <body>
    <table>
    <tr>
    <td>TnameA</td>
    <td>4.1.1999</td>
    <td>200.12</td>
    </tr>
    <tr>
    <td>TnameB</td>
    <td>03.10.2000</td>
    <td>2000</td>
    </tr>
    <tr>
    <td>TnameC</td>
    <td>22.12.1989</td>
    <td>400.60</td>
    </tr>
    </table>
    </body>
    </html>
    This works fine. But the generated excel file does not have the cell format. Background is white, with no cells being seen.
    Secondly, can i give the name dynamically for the excel file.
    Thanks
    RM

    hi
    following code should run. In such code you should be careful in two point:
    1. In statement (<%@page import="java.io.*"%><% ) no blank between %> and <%
    2. no html code, no header, nothing about html.
    you can change ( String message = ( String )session.getAttribute( "EXCEL" ); ) however you want.
    \t : next cell
    \n: next line
    <%@page language='java' contentType='text/html;'%>
    <%@page session="true"%>
    <%@page import="java.io.*"%><%
    response.setContentType("application/vnd.ms-excel");
    String excelFileName = "Hello";
    response.setHeader("Content-Disposition","attachment; filename=" + excelFileName+".xls" );
    String message = ( String )session.getAttribute( "EXCEL" );
    PrintWriter pw = response.getWriter();
    pw.println(message);
    pw.flush();
    pw.close();
    %>
    your second question : yes you can. ( excelFileName )

  • Pivot Report in Excel from Oracle data base

    I need to bring data in Excel from Oracle table.
    The connectivity was established without any problem.
    When trying to transform the newly created query into
    a pivot table a am not able to see the data inside the
    "Data area" of pivot table as it is in the data base
    tables, instead Excel transforms the data in Sum, Average,
    etc...
    I believe it is an Excel issue but I am not sure.
    Any sugestions would be appreciated.
    Thanks,
    Larry Moise

    Thank u but already i do have apache POI
    hoew to make a conversion of coulmn data to excel

  • Export data to Excel

    Hello All,
                I am trying to export data to Excel from a report output. Its a simple report. I have tried the below FM
    CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
    EXPORTING
      DATA_FILENAME             =
      DATA_PATH_FLAG            = 'W'
      DATA_ENVIRONMENT          =
      DATA_TABLE                =
      MACRO_FILENAME            =
      MACRO_PATH_FLAG           = 'E'
      MACRO_ENVIRONMENT         =
      WAIT                      = 'X'
      DELETE_FILE               = 'X'
    EXCEPTIONS
      NO_BATCH                  = 1
      EXCEL_NOT_INSTALLED       = 2
      INTERNAL_ERROR            = 3
      CANCELLED                 = 4
      DOWNLOAD_ERROR            = 5
      NO_AUTHORITY              = 6
      FILE_NOT_DELETED          = 7
      OTHERS                    = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This FM when executed without passing any data is able to open an empty excel sheet but when I try to pass an internal table to DATA_TABLE  its giving a dump. The run time error is CALL_FUNCTION_CONFLICT_TYPE.
    Error:
    **"The function module interface allows you to specify only fields      
    of a particular type under "TABNAME". The field "ITAB1" specified here
    has a different field type."**
    Please let me know if Im missing something.
    Thanks in advance.

    Hi SAP,
    Simply List -> Save -> File -> spreadsheet -> file.xls
    Or check this weblog..
    <a href="/people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel:///people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel
    or
    try this code..
    DATA : file_name TYPE ibipparms-path,
    lc_filename TYPE string.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    IMPORTING
    file_name = file_name .
    lc_filename = file_name.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = lc_filename
    filetype = 'DAT'
    TABLES
    data_tab = gt_itab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Revert back for more help
    Reward points if helpful
    Regards
    Naresh

  • Security message on exporting grid to excel from webpage

    I am exporting data to excel from grid on a webpage. I have written following code:
    gv.DataSource = resultlist;
    gv.DataBind();
    Response.ClearContent();
    Response.AddHeader("content-disposition", "attachment; filename=Test.xls");
    Response.ContentType = "application/excel";
    //Ccreate string writer object and pass it to HtmlTextWriter object
    StringWriter sw = new StringWriter();
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    gv.RenderControl(htw);
    Response.Write(sw.ToString());
    Response.End();
    Code is executing correctly. But when I open this excel, it is giving me a warning message which says, "The file you are trying to open, "Test.xls", is in a different format than specified by the file extension. Verify that the file is not
    corrupted and is from a trusted source before opening the file. Do you want to open the file now?"
    File gets opened when I select "Yes" on this message box, but I don't want to get this message box. Is there any work-around to get rid of it? When I selected "Save As" option of this file, I found that default type of the file was Webpage.
    How can we get this default type as "xls or xlsx"? I think this problem will be resolved when we will get this default type as "xls or xlsx". 

    Hi Ajinkya,
    Please post in ASP.NET forums:
    http://forums.asp.net/
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem while exporting data to Excel sheet.......

    Hi
    I have written the following code to export data to excel sheet...
    data:
           conv_out TYPE REF TO cl_abap_conv_out_ce,
           content TYPE xstring.
    data : itab_slsrl type table of znslsrlitm.
    data: xml_out TYPE string.
    Data:
    Node_slsrl type ref to If_Wd_Context_Node,
    Elem_slsrl type ref to If_Wd_Context_Element,
    Stru_slsrl type ref to if_wd_context_element .
    call transformation ('ID') source tab = itab_slsrl[] result xml xml_out.
    CALL FUNCTION 'CRM_IC_XML_STRING2XSTRING'
    EXPORTING
    INSTRING = xml_out
    IMPORTING
    OUTXSTRING = content.
    conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
    DATA: lv_filename TYPE string.
    conv_out->convert( exporting data = xml_out IMPORTING buffer = content ).
    cl_wd_runtime_services=>attach_file_to_response(
    i_filename = 'Sales_order_release.xls'
    i_content = content
    i_mime_type = 'application/msexcel'
    i_in_new_window = i_in_new_window
    i_inplace = i_inplace ).
    But when i am trying to export data to excel sheet i am getting
    following error...
    "Switch from current encode to specified encoding is not supported"
    "<?xml version="1.0" encoding='utf-16"?>"
    if i change encoding utf-8 to utf-16 in my code its giving dump..
    "The conversion of certain code pages is not supported"
    Did i miss any step...?
    How to resolve this problem please help me....
    Thanks & Regards
    Sowmya.....

    Hi Sowmya,
    I do had a similar issue, but I avoided that problem temporarily by commenting the following code.
        l_conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8'  ).
    attach the first file
    l_conv_out->convert( exporting data = l_xml_out IMPORTING buffer = l_content  ).
    Once this is done, you can export the data to Excel and open it and see too...But this is a temporary solution only. Implement this solution to get to understand more flaws of this.
    Regards
    Raja Sekhar
    Edited by: Raja Sekhar on Dec 26, 2007 7:51 PM

Maybe you are looking for