Export to excel using client_ole2

Hi everyone
i am using the following code to write to excel
-- Start Excel and make it visible
application := CLIENT_OLE2.create_obj ('Excel.Application');
CLIENT_OLE2.set_property (application, 'Visible', 'True');
-- Return object handle to the Workbooks collection
workbooks := CLIENT_OLE2.get_obj_property (application, 'Workbooks');
--- open Workbook object to the Workbooks collection
workbook := CLIENT_OLE2.invoke_obj(workbooks, 'ADD');
-- Open worksheet Sheet1 of that Workbook
worksheets := CLIENT_ole2.get_obj_property (workbook, 'Worksheets');
worksheet := CLIENT_ole2.invoke_obj (worksheets, 'ADD');
CLIENT_ole2.set_property (worksheet, 'NAME','ΠΩΛΗΣΕΙΣ');
My problem is that in the last command when i use grek characters('ΠΩΛΗΣΕΙΣ') i get the message
WUO-712 com.jacob.com.comfailexception:invoke of name source:microsoft office excel
Any ideas?
Thanks Hermes

Hi
finally i get the excel but with question marks in columns with greek characters.This is a nls_lang problem
Pls answer urself on these questions...
1. did u change it to Greek in ur Windows Registery... ?
2.Did - the most important - ur windows has Greek characters installed ?
if the answer is no pls make sure u have installed it and test it in a note pad before re-trying.
Hope this helps...
Regards,
Ammatu Allah.

Similar Messages

  • Generating Excel using Client_ole2

    Hi
    I am using the following codde to generate excel file from form but when i click on button nothing happens and i can not exit the form also... please help me...
    thanks.....
    DECLARE
         A BOOLEAN;
         args client_ole2.list_type;
         application client_ole2.obj_type;
         vworkbooks client_ole2.obj_type;
         vdoc client_ole2.obj_type;
         vworksheet client_ole2.obj_type;
         vrange client_ole2.obj_type;
    BEGIN
    -- create app object
    application := client_ole2.create_obj('Excel.Application');
    client_OLE2.SET_PROPERTY(application, 'Visible','True');
    -- get workbooks object
    vworkbooks := client_ole2.get_obj_property(application, 'Workbooks');
    -- and open a file
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'c:\tp_ae.xls');
    vdoc :=client_ole2.INVOKE_OBJ(vworkbooks,'Open',args);
    client_ole2.destroy_arglist(args);
    -- get a worksheet object
    -- for this to work you need to know the sheet name or its index
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 1); --<-- name or index
    vworksheet := client_ole2.get_obj_property(vdoc,'Worksheets',args);
    client_ole2.destroy_arglist(args);
    -- get a range object which in this case is just a cell
    -- for this to work you need to know the cell coordinates
    args := client_ole2.create_arglist;
    client_ole2.ADD_ARG(args, 'B6');
    vrange := client_ole2.get_obj_property(vworksheet,'Range',args);
    client_ole2.destroy_arglist(args);
    -- and here you get the value
    message(client_ole2.get_char_property(vrange,'Value'));
    -- release objects
    client_ole2.release_obj(vrange);
    client_ole2.release_obj(vworksheet);
    client_ole2.release_obj(vdoc);
    client_ole2.release_obj(vworkbooks);
    client_ole2.release_obj(application);
    END;

    hi
    if you want to export the data to excel then use the following code and the following code u can use any schema and it will export all data with headers.
    PROCEDURE fpr_forms_to_excel(p_block_name in varchar2 default NAME_IN('system.current_block'),
                                                                           p_path                in varchar2 default 'C:\',
                                                                           p_file_name      in varchar2 default 'Temp') 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;
         range                                         OLE2.OBJ_TYPE;
         range_col                               OLE2.OBJ_TYPE;
         -- Declare handles to OLE argument lists
         args                                           OLE2.LIST_TYPE;
         arglist                                     OLE2.LIST_TYPE;
         -- Declare form and block items
         form_name                               VARCHAR2(100);
         f_block                                    VARCHAR2(100);
         l_block                                    VARCHAR2(100);
         f_item                                         VARCHAR2(100);
         l_item                                         VARCHAR2(100);
         cur_block                               VARCHAR2(100):= NAME_IN('system.current_block');
         cur_item                                    VARCHAR2(100);
         cur_record                               VARCHAR2(100);
         item_name                               VARCHAR2(100);
         baslik                                         VARCHAR2(100);
         row_n                                         NUMBER;
         col_n                                         NUMBER;
         filename                                    VARCHAR2(1000):= p_path||p_file_name;
         ExcelFontId                          OLE2.list_type;
    BEGIN
              -- Start Excel
              application:=OLE2.CREATE_OBJ('Excel.Application');
              OLE2.SET_PROPERTY(application, 'Visible', 'False');
              -- Return object handle to the Workbooks collection
              workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
              -- Add a new Workbook object to the Workbooks collection
              workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
              -- Return object handle to the Worksheets collection for the Workbook
              worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
              -- Get the first Worksheet in the Worksheets collection
              -- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
              args:=OLE2.CREATE_ARGLIST;
              OLE2.ADD_ARG(args, 1);
              worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
              OLE2.DESTROY_ARGLIST(args);
              -- Return object handle to cell A1 on the new Worksheet
              go_block(p_block_name);
              baslik := get_block_property(p_block_name,FIRST_ITEM);                                                  --commented to consider the second item as the first item
              f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM); --in order to skip the old filename in the excel file
              l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
              first_record;
              LOOP
                  item_name := f_item;
                  row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
                  col_n := 1;
                        LOOP
                             IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND get_item_property(item_name,VISIBLE)='TRUE' THEN
                             -- Set first row with the item names
                                   IF row_n=1 THEN
                                            args := OLE2.create_arglist;
                                            OLE2.add_arg(args, 1);
                                            OLE2.add_arg(args, col_n);
                                            cell := OLE2.get_obj_property(worksheet, 'Cells', args);
                                            OLE2.destroy_arglist(args);
                                            --cell_value := OLE2.get_char_property(cell, 'Value');
                                            ExcelFontId := OLE2.get_obj_property(Cell, 'Font');
                                            OLE2.set_property(ExcelFontId, 'Bold', 'True');
                                            baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
                                            args:=OLE2.CREATE_ARGLIST;
                                            OLE2.ADD_ARG(args, row_n);
                                            OLE2.ADD_ARG(args, col_n);
                                            cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
                                            OLE2.DESTROY_ARGLIST(args);
                                            OLE2.SET_PROPERTY(cell, 'Value', baslik);
                                            OLE2.RELEASE_OBJ(cell);
                                   END IF;
                             -- Set other rows with the item values
                                       args:=OLE2.CREATE_ARGLIST;
                                       OLE2.ADD_ARG(args, row_n+1);
                                       :control.message:=row_n||' Row(s) Processed.';
                                synchronize;
                                       OLE2.ADD_ARG(args, col_n);
                                       cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
                                       OLE2.DESTROY_ARGLIST(args);
                                  IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
                                        OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
                                  END IF;
                                       OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
                                       OLE2.RELEASE_OBJ(cell);
                             END IF;
                             IF item_name = l_item THEN
                                   exit;
                             END IF;
                             baslik := get_item_property(item_name,NEXTITEM);
                             item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
                             col_n := col_n + 1;
                        END LOOP;
              EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
              --exit;
                         NEXT_RECORD;
              END LOOP;
              -- Autofit columns
              range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
              range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
              OLE2.INVOKE( range_col,'AutoFit' );
              OLE2.RELEASE_OBJ( range );
              OLE2.RELEASE_OBJ( range_col );
              -- Save as worksheet with a Specified file path & name.
               IF NVL(filename,'0')<>'0' THEN
                    args := OLE2.CREATE_ARGLIST;
                            OLE2.ADD_ARG(args,filename );
                                         OLE2.INVOKE(worksheet,'SaveAs',args );
                                         OLE2.DESTROY_ARGLIST( args );
              END IF;
              --      Release the OLE objects
              OLE2.RELEASE_OBJ(worksheet);
              OLE2.RELEASE_OBJ(worksheets);
              OLE2.RELEASE_OBJ(workbook);
              OLE2.RELEASE_OBJ(workbooks);
              OLE2.INVOKE     (application,'Quit');
              OLE2.RELEASE_OBJ(application);
              -- Focus to the original location
    exception
         when others then null;
                                  raise form_trigger_failure;
    END; Note:- As i mentioned in my previouse posts if your webutil is not configured
    so the client_ole2 will not work before using client_ole2 u have to configure webutil.
    sarah

  • Header of ALV with space when exported to excel using Standard ALV

    Hi,
    I am Using Reuse alv grid display    to dispaly my report and it works fine and I am using the standard SAP application tool to export it to excel.
    But for some of the header fields I am getting space in the excel sheet but there is no space while displaying through ALV.
    I am using the following field catalog for the same.
    wa_fieldcat-col_pos = 10.
      wa_fieldcat-fieldname = 'SOLLWERT'.
      wa_fieldcat-seltext_l  = 'text-t10'.      "Target value (* this has no space here)
      wa_fieldcat-outputlen = 32.
    wa_fieldcat-colwidth_optimize = 'X'.
      APPEND wa_fieldcat to it_fieldcat.
    but there are still space for this Colomn when exported to excel if after optimizing the column.
    kindly suggest what field needs to be passed to the field catalogoe to avoid spaces in excel for the header.
    Thanks
    Ritesh

    hey all,
    Thanks everyone for the reply.
    I am using the foloowing field cat:
    l_col_pos = l_col_pos + 1.
        wa_fieldcat-col_pos = l_col_pos.
        wa_fieldcat-outputlen = 32.            
         wa_fieldcat-fieldname = 'SOLLWERT'.
         wa_fieldcat-inttype   = 'P'.             
    *    wa_fieldcat-tabname = 'i_final'.      
        wa_fieldcat-seltext_l = text-t11.         "Target Value
        APPEND wa_fieldcat TO i_fieldcat.
        CLEAR wa_fieldcat.
    I have use this also in the field cat but stil i get space in the excel header.
    wa_fieldcat-REF_FIELDNAME = 'SOLLWERT'.
    *    wa_fieldcat-REF_TABNAME =  'QAMV'.
    Also the space comes with the descrip[tion in the cell of excel.
    its like [space Target Value] and i dont need this Space.
    I have also used  wa_layout-colwidth_optimize = 'X'. but it doesnt wrk.
    Please suggest

  • Not able to write to Excel using Client_OLE2 and webutil

    Hi
    I am working on Windows 2000 Pro SP4 Oracle Forms Builder 10.1.2.0.2
    I am using webutil to invoke Excel Application .
    The following code invokes Excel application and saves in the path specified as Test_Excel and writes the "Test Data to be written" to R1C1 when I use OLE2.
    But when I replace OLE2 with Client_OLE2 the Excel file is getting created but the data is not written to the cell.
    PL/SQL :could not find program unit being called is the error.
    Can anybody help me solve this issue ?
    Thanks in advance.
    FUNCTION WRITE_TO_EXCEL(
    excel_file_name in varchar2, ---for eg.. C:\Test_Excel.xls
    buf in varchar2 ) ----Test Data to be written
    return boolean is
    application CLIENT_OLE2.OBJ_TYPE;
    workbooks CLIENT_OLE2.OBJ_TYPE;
    workbook CLIENT_OLE2.OBJ_TYPE;
    worksheets CLIENT_OLE2.OBJ_TYPE;
    worksheet CLIENT_OLE2.OBJ_TYPE;
    cell CLIENT_OLE2.OBJ_TYPE;
    args CLIENT_OLE2.LIST_TYPE;
    begin
    application := CLIENT_OLE2.CREATE_OBJ ('Excel.Application');
    CLIENT_OLE2.SET_PROPERTY(application, 'Visible', 'True');
    workbooks := CLIENT_OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
    workbook := CLIENT_OLE2.Invoke_Obj(workbooks, 'Add');
    worksheets := CLIENT_OLE2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := CLIENT_OLE2.Invoke_Obj(worksheets,'Add');
    args:=CLIENT_OLE2.create_arglist;
    CLIENT_OLE2.add_arg(args,1);
    CLIENT_OLE2.add_arg(args,1);
    cell:=CLIENT_OLE2.get_obj_property(worksheet, 'Cells', args);
    CLIENT_OLE2.destroy_arglist(args);
    CLIENT_OLE2.set_property(cell,'Value', buf);
    CLIENT_OLE2.release_obj(cell);
    CLIENT_OLE2.Release_Obj(worksheet);
    CLIENT_OLE2.Release_Obj(worksheets);
    args := CLIENT_OLE2.Create_Arglist;
    CLIENT_OLE2.Add_Arg(args,excel_file_name);
    CLIENT_OLE2.Invoke(workbook, 'SaveAs', args);
    CLIENT_OLE2.Destroy_Arglist(args);
    args := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(args,'Caption');
    CLIENT_OLE2.INVOKE(application,'Run',args);
    CLIENT_OLE2.destroy_arglist(args);
    CLIENT_OLE2.Release_Obj(workbook);
    CLIENT_OLE2.Release_Obj(workbooks);
    CLIENT_OLE2.Invoke(application, 'Quit');
    CLIENT_OLE2.Release_Obj(application);
    return(TRUE);
    exception
    when others then
    message (error_type||'-'||error_code||':'||error_text);
    message (' ');
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');
    CLIENT_OLE2.RELEASE_OBJ(application);
    CLIENT_OLE2.RELEASE_OBJ(workbooks);
    CLIENT_OLE2.RELEASE_OBJ(workbook);
    CLIENT_OLE2.release_obj(worksheet);
    CLIENT_OLE2.release_obj(worksheets);
    return(FALSE);
    END;

    What line is actually causing the error? Also, I assume you tested the exact same code which works when using straight OLE2 (and not the webutil client_ version)?
    Regards
    Grant Ronald
    Oracle Product Management

  • Export to excel using value set

    Hi all,
    I have an ALV table and in some columns I show the texts defining value_set (set_attribute_value_set). When I export the table to Excel using the standard button in the file I can see the codes, not the defined texts. How can I solve it? I thought about defining additional columns which will contain the texts and will be invisible in the screen and visible in Excel sheet instead of the column with codes, but I would like to know if there is any easier solution.
    Thank you,
    Anna

    Hi
    You can use Filedownload control to download the content you prepare as XML
    reading the context.
    For Ex: if you have product ID, Product Name and price as attributes.
    you can create the XML string as
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <products>
    <product>
       <productID>1234</productID>
       <productName>Sony</productName>
       <price>1234.00</price>
    </product>
    <product>
       <productID>1234</productID>
       <productName>Sony</productName>
       <price>1234.00</price>
    </product>
    </products>
    copy paste this in note pad name the file as products.xls and open it in MSXL.
    similarly you can read the context and form this xstring and just supply to filedownload control.
    Regards
    Abhimanyu L
    Message was edited by:
            Abhimanyu Lagishetti

  • Reports output delayed when exported to Excel using OLE2

    Hi All,
    Platform - Oracle Application Server 10g Release 2 10.1.2.3 on Windows 32 bit.
    The report output is getting generated in a minute when exported to PDF i.e destype=cache & desformat=pdf. When we generate the output to excel is considerably delayed. It is taking time and internal server error is occuring.
    1) Report developed with simple query
    2) Used RPT2XLS procedure which uses OLE2 builtin to export report output into excel.
    3) Called RPT2XLS.run procedure in After-Report trigger of the report.
    4) We have relased all memory objects in the RPT2XLS package after exporting data and there is no EXCEL.exe running once the file is generated.
    System parameters used in the URL.
    . destype=file
    desformat=pdf
    CONTAINSOLE=yes (Required for exporting OLE2 objects into Excel in report)
    desname=path & name of the file.
    I have gone through the tuning documents for reports server and increased minengine, maxengine and initengine parameters of the reports engine and also changed maxconnect and IdleTimeout parameters in reports server configuration file.
    What might be the reason for delaying in the output of the reports when exported to Excel. Can the guys with special knowledge on this area help us in getting out of this issue.
    Thanks in advance.

    hey all,
    Thanks everyone for the reply.
    I am using the foloowing field cat:
    l_col_pos = l_col_pos + 1.
        wa_fieldcat-col_pos = l_col_pos.
        wa_fieldcat-outputlen = 32.            
         wa_fieldcat-fieldname = 'SOLLWERT'.
         wa_fieldcat-inttype   = 'P'.             
    *    wa_fieldcat-tabname = 'i_final'.      
        wa_fieldcat-seltext_l = text-t11.         "Target Value
        APPEND wa_fieldcat TO i_fieldcat.
        CLEAR wa_fieldcat.
    I have use this also in the field cat but stil i get space in the excel header.
    wa_fieldcat-REF_FIELDNAME = 'SOLLWERT'.
    *    wa_fieldcat-REF_TABNAME =  'QAMV'.
    Also the space comes with the descrip[tion in the cell of excel.
    its like [space Target Value] and i dont need this Space.
    I have also used  wa_layout-colwidth_optimize = 'X'. but it doesnt wrk.
    Please suggest

  • Column Headers in Excel using CLIENT_OLE2

    Hello guys,
    I have muti record block that has 10 columns which I want to display in Excel. I created a procedure RUN_EXCEL and everything works fine when the button is pressed and the procedure is called. However, I want to add the column prompts and when I try to do that using the prompt text I get the column headers but all the rows and colums mess up. Can anyone tell me how to get the column header to work to add in my current procedure. Right now if I run this way it doesn't display the promt headers.
    Thanks
    PROCEDURE RUN_EXCEL IS
    application Client_OLE2.Obj_Type;
    workbooks Client_OLE2.Obj_Type;
    workbook Client_OLE2.Obj_Type;
    worksheets Client_OLE2.Obj_Type;
    worksheet Client_OLE2.Obj_Type;
    args Client_OLE2.List_Type;
    cell client_ole2.Obj_Type;
    font client_ole2.obj_type;
    range client_ole2.obj_type;
    range_col client_ole2.obj_type;
    item_prompt VARCHAR2(32767);
    j INTEGER;
    k INTEGER;
    l INTEGER;
    BEGIN
    application := Client_OLE2.create_obj('Excel.Application');
    Client_OLE2.Set_Property ( application , 'visible', 1);
    workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');
    workbook := Client_OLE2.Invoke_Obj(workbooks, 'Add');
    worksheets := Client_OLE2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := Client_OLE2.Invoke_Obj(worksheets, 'Add');
    go_block('DM_T_EXCEPTION_LOG');
    first_record;
    j:=1;
    k:=1;
    while :system.last_record = 'FALSE'
    loop
    for k in 1..10 /* Table has 10 columns */
    loop
    If not name_in(:system.cursor_item) is NULL Then
         item_prompt := get_item_property(:SYSTEM.CURRENT_BLOCK||'.'||:SYSTEM.CURRENT_ITEM, prompt_text);
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    range := client_ole2.get_obj_property (worksheet, 'UsedRange');
    range_col := client_ole2.get_obj_property (range, 'Columns');
    client_ole2.invoke (range_col, 'AutoFit');
    End If;
    next_item;
    end loop;
    j:=j+1;
    next_record;
    end loop;
    /* For the last record */
    for k in 1..10
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    -- imessage('in k again'||' '||:system.cursor_item||' '||item_prompt);
    Client_OLE2.release_obj(cell);
    range := client_ole2.get_obj_property (worksheet, 'UsedRange');
    range_col := client_ole2.get_obj_property (range, 'Columns');
    client_ole2.invoke (range_col, 'AutoFit');
    End If;
    next_item;
    end loop;
    ole2.set_property(application, 'Visible', 'false');
    client_ole2.release_obj (range);
    client_ole2.release_obj (range_col);
    Client_OLE2.Release_Obj(worksheet);
    Client_OLE2.Release_Obj(worksheets);
    END;

    Re:  Problem area in code
    "Match" is a worksheet function and is not used in VBA unless it is identified as a worksheet function, such as...
      X = Application.WorksheetFunction.Match(arg, arg, arg)
    Jim Cone
    Portland, Oregon USA
    free 'Save Selection as Picture' excel add-in
    (a couple of clicks & you have a picture file of the selected cells)
    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

  • Exporting into Excel Using the Dynpro Binary Cache is not working on NW04s

    Hello,
    I am using excel data export using the
    "Exporting Context Data into Excel Using the Web Dynpro Binary Cache" guide at
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/edc2f3c2-0401-0010-8898-acd5b6a94353">this link</a>.
    The tutorial is working on NW04 but when I use it on NW04s I receive errors for the StringBuffer object:
    java.lang.NoSuchMethodError: java.lang.StringBuffer.append(Ljava/lang/String;)Ljava/lang/AbstractStringBuilder;
    Any ideas?

    Hallo Roy,
    I have created an updated/enhanced version of this tutorial running on NW 7.0. The new solution allows to open the exported Excel File instantly without opening a popup window befor:
    See <a href="https://wiki.sdn.sap.com/wiki/x/0mQ">Exporting Table Data Using On-Demand Streams - SAP NetWeaver 7.0</a>.
    <b>NOTE:</b>
    Use <b>LinkedHashMap</b> instead of <i>HashMap</i>
      private Map getProductColumnInfos() {
        Map columnInfosMap = new LinkedHashMap();
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.QUANTITY, "Quantity");
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.ARTICLE, "Article");
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.COLOR, "Color");
        columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.PRICE, "Price in EURO");
        columnInfosMap.put(
          IPrivateTableCompBasketView.IProductsElement.TOTAL__PER__ARTICLE,
          "Total Per Article In Euro");
        return columnInfosMap;
    This keeps the order of key-displaytext-pairs passed by the client (table component) to the service (excel export component) stable.
    Regards, Bertram

  • Export to excel using service for office 2007

    Hi All,
    I am using a service to download the opport search result data into excel. Inside the code, it gets all the data and opens one window of excel download and closes automatically after few second. And finally does not download anything.
    It is working for office 2003, not for office 2007.I am following piece of code.Please help me how to achieve the same.
    DATA: l_xstring TYPE xstring,
          app_type type string,
          app_type_c(50) type c.
    app_type = 'APPLICATION/MSEXCEL; charset=utf-16le'.
          app_type_c = app_type.
          CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
              text     = output      "my data to be exported into excel
              mimetype = app_type_c
            IMPORTING
              buffer   = l_xstring.
          CONCATENATE  cl_abap_char_utilities=>byte_order_mark_little
                       l_xstring
                       INTO l_xstring IN BYTE MODE.
    server->response->set_header_field( name =  'content-type'
                                        value = app_type ).
    server->response->delete_header_field( name = if_http_header_fields=>cache_control ).
    server->response->delete_header_field( name = if_http_header_fields=>expires ).
    server->response->delete_header_field( name = if_http_header_fields=>pragma ).
    server->response->set_header_field( name = 'Content-Disposition'
                                        value =  'attachment;filename=Opportunity_Result.xls'  ).
    CLEAR lv_length.
    lv_length = XSTRLEN(  l_xstring ).
    server->response->set_data( data =  l_xstring
                                 length = lv_length ).

    Maybe it's possible, but I doubt it.
    Reason is that you're asking the URL to run the report and then once done export out the values and I just don't think the 'i' - or now 'g' versions support this.
    This was why the command line interface with the Desktop version was so popular as this is exactly the kind of thing you can do, plus much more.
    I checked the documentation for Plus and can find nothing about doing this in the URL. Maybe someone will say otherwise, but with Plus I don't think it's possible.
    Russ

  • Exception : Export To Excel using POI in ADF

    Hi,
    When i am using POI jars for export to Excel functionality I ma getting the following Exception.
    Actually page contains simple button .When user clicks on the button i am getting the values from the iterator and then exporting those values to the Excel using POI.
    javax.faces.el.EvaluationException: oracle.classloader.util.AnnotatedNoClassDefFoundError:
    Missing class: org.apache.xmlbeans.XmlOptions Dependent class: org.apache.poi.POIXMLDocumentPart
    Loader: current-workspace-app.web.ExportToExcelPOC-ViewController-webapp:0.0.0
    Code-Source: /C:/Documents and Settings/dtamarap/Desktop/export/poi-bin-3.6-20091214/poi-3.6/poi-ooxml-3.6-20091214.jar
    Configuration: <classpath> in C:\Durga\Jdev\jdevstudio10133\jdev\mywork\ExportToExcelPOC\ViewController\public_htmlT
    he missing class is not available from any code-source or loader in the system. at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143) at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:406) at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1019) at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1046) at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:761) at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:451) at oracle.adf.view.faces.webapp.UIXComponentTag.doStartTag(UIXComponentTag.java:85) at test.ExportToExcel_jspx._jspService(_ExportToExcel_jspx.java:57) [test/ExportToExcel.jspx] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at
    .............................

    When you run your application, it is complaining that it cannot find a class. That class is part of Apache XMLBeans (http://xmlbeans.apache.org/). You need to ensure that you get the XMLBeans JAR file and include it in your project, just like you did for the Apache POI JAR file.
    John

  • Export to excel using MDM WebDynPro Configurator

    Hi,
    I am developing an application using MDM WDC and need to display Export to excel button with corresponding functionality.Is there an API available to do the same? Is it possible to get the search results details in the excel sheet while using MDM WDC?
    version used is MDM  7.1 SP06 and NWCE 7.2 .
    Regards,
    Apoorva Dave

    it is standard function of mdm wd component.
    we are in MDM 7.1 SP5, the api only gives you the string of  the selected record in xml format.
    i am using xslt to transform the xml as user are not happy with the standard export.

  • Export to Excel using URL in Discoverer Plus

    Using Discoverer 4i Plus.
    Using URL arguments I want to export to Excel automatically. I see that if I was using Discoverer Viewer it would be something like fm=xls. Is there similar code for doing this with Plus?
    Thanks!

    Maybe it's possible, but I doubt it.
    Reason is that you're asking the URL to run the report and then once done export out the values and I just don't think the 'i' - or now 'g' versions support this.
    This was why the command line interface with the Desktop version was so popular as this is exactly the kind of thing you can do, plus much more.
    I checked the documentation for Plus and can find nothing about doing this in the URL. Maybe someone will say otherwise, but with Plus I don't think it's possible.
    Russ

  • Chinese csv file export to excel using POI

    Dear all,
    I would like to read the csv chinese data to excel using POI in java but the character in excel is corrupted. How can I solve it? Please help me. Thank you!
    Regards,
    kzyo

    Use the correct encoding for the reading and writing streams.

  • Testing export to excel using Selenium.

    I am trying to test export to excel functionality in selenium. I want to get the Id of the pop-up(save file) dialog. Is there a way to get page source of this pop-up dialog.

    Maybe it's possible, but I doubt it.
    Reason is that you're asking the URL to run the report and then once done export out the values and I just don't think the 'i' - or now 'g' versions support this.
    This was why the command line interface with the Desktop version was so popular as this is exactly the kind of thing you can do, plus much more.
    I checked the documentation for Plus and can find nothing about doing this in the URL. Maybe someone will say otherwise, but with Plus I don't think it's possible.
    Russ

  • Export to excel using deski report

    Hi,
    We are using BOXIR2 SP4 version. We have a deski report that generates excel output file and it was working fine until yesterday. Today that report successfully exported excel output file, but I was not able to open excel file and it gives me below error:
    Excel found unreadable content in 'abc.xls'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes.
    Now, if I select Yes, then it opens blank sheet.
    I found that today there was a new record in the report for new customer. When I filtered out that customer record it works fine. So I thought may be something wrong with that customer.
    After that I filtered out 10 existing customers and then also I was able to open excel sheet with new customer record as well. So, I tried few other things to resolve the issue, if I reduce the length of Customer_name field from 35 to 30 by using SubStr(), it works fine. If I add a new field Customer ID to the left of Customer_name field, it works fine.
    This is a strange issue. I have suggested our client the above option that have worked. But if client is not OK with it, I will still have to find the root cause and resolve this issue.
    Please advise.
    Thanks,
    Nikhil

    with your product version there are little options you have.
    1. Upgrade to the latest SP and patch on XIR2 (SP6, fp6.4) and re-test
    2. Upgrade to current product release.
    3. figure out what has changed and how in the report and reverse those changes.

Maybe you are looking for

  • App Store MAC Updates download and install, yet show as needing Update

    I have, 4 times now, selected UPDATE on two apps that show as having free updates. they do so and tell me they are installing, and the buttons change to installed. Then I quit App Store, to find the red button with 2 in it re-appears and I start the

  • Only Prints Blank Pages

    I am using Acrobat 8 Professional. When I open e-mail pdf attachments I can see them, but when I try to print I simply get blank pages. The only way I seem to be able to get it to work is to uninstall/repair and then it works for a while. Any suggest

  • Inherited display method - Reply

    If a method that is defined in a super class, is ALSO defined in a child class, that child method is not automatically filled with the code in the parent's method of the same name. This is 'overriding' a method. Any common code would need to be in th

  • Firefox won't let me watch any type of video or listen to any audio

    It started around the time I downloaded Google Chrome, but I'm not sure if they had anything to do with each other. Videos and Audio don't work on any site for me- I live in China so I use Youku, Tudou, Soso, Tumblr, and all of these sites used to le

  • Problem with BTE RWBAPI01

    Hi, we are receving the Vendor invoices from SEIBEL system through WEBSPHERE using BAPI_ACC_DOCUMENT_POST. SInce Bapi allows duplicates we have implimented BTE RWBAPI01 in FIBF to restrict the duplicates. in FIBF we gave customer prodcut and not prov