DDE comm from Forms 4.5 to Excel in Win NT 4.0

Does anybody knows how to create a DDE communication channel from Forms 4.5 to Excel running under Win NT 4.0.
I've got the form that run under Win95 but when I try to run in NT and create the DDE comm channel it can't establish the link.
I really apreciate any help about it..

Check that the path for the excel.exe file is the same on the NT machine as it is on the Win 95 machine. That's the most likely cause of the problem. (I had this!)
Harry
null

Similar Messages

  • Dumping data from forms 4.5  to excel

    Hi,
    we use oracle 8.1.3 (WINDOWS 2000) / forms 4.5 (WINDOWS 98).
    we call a procedure from forms 4.5 to dump oracle data
    into excel file. The procedure is working fine. The problem is
    after dumping data into excel file and exiting the program,
    excel is not completely closed.
    If i press "ctrl + alt + delete" i can see excel is still in use.
    Because of this if i click on excel file it doesn't open automatically.
    Any suggestions?
    regards,
    chetty.
    PROCEDURE RUN_EXCEL_REPORT_summary IS
    v_text VARCHAR2(100);
    currow NUMBER;
    curcol NUMBER;
    obj OLE2.obj_type;
    wb OLE2.obj_type;
    sheet OLE2.obj_type;
    cell OLE2.obj_type;
    olearg OLE2.obj_type;
    CURSOR cc_exp(P_YEAR_start_date DATE,P_year_end_date DATE) IS
    SELECT      
    l.account_no,account_desc,
    SUM(NVL(debit_amt,0))-SUM(NVL(credit_amt,0)) YTD_Amount
    FROM      gl_line_items l,gl_journal_entries h ,gl_accounts m,gl_cost_centre_master glm
    WHERE      l.entity_code = 'TWL01'
         AND l.account_no = m.account_no
         AND m.chart_name = 'LOC - CHART'
         AND cost_centre_code = glm.cc_code(+)
         AND h.entity_code = l.entity_code
         AND h.journal_type = l.journal_type
         AND h.journal_no = l.journal_no
         AND h.post_it = 1
         AND h.posted_flag = 1
         AND L.TRAN_date BETWEEN '01-JAN-03' AND '31-DEC-03'
    GROUP BY
    l.account_no ,account_desc
    ORDER BY 1;
    BEGIN
    currow := 1; -- Current row number on the excel sheet
    curcol := 3; -- Current column number on the excel sheet
    obj := OLE2.CREATE_OBJ('excel.application');
    OLE2.SET_PROPERTY(obj,'visible','true');
    wb := OLE2.GET_OBJ_PROPERTY(obj,'workbooks');
    sheet := OLE2.GET_OBJ_PROPERTY(wb,'add');
    -- Print Report Title
    olearg := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(olearg,currow);
    OLE2.ADD_ARG(olearg,curcol);
    cell := OLE2.GET_OBJ_PROPERTY(obj,'cells',olearg);
    ole2.SET_PROPERTY(cell,'value','TRIAL BALACE - SUMMARY');
    -- Print Data
    -- FOR x IN cc_exp(v_year_start_date,v_year_end_date) LOOP
    FOR x IN cc_exp(v_year_start_date,:P_TO_DATE) LOOP
    currow := currow + 1; -- start with next row
    curcol := 2; -- start with second column
    FOR k in 2..5 LOOP
    IF k = 2 THEN
    v_text := x.account_no;
    END IF;
    IF k = 3 THEN
    v_text := x.account_desc;
    END IF;
    IF k = 4 THEN
    NULL;
    END IF;
    IF k = 5 THEN
    v_text := TO_CHAR(x.Ytd_amount);
    END IF;
    olearg := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(olearg,currow);
    OLE2.ADD_ARG(olearg,curcol);
    cell := OLE2.GET_OBJ_PROPERTY(obj,'cells',olearg);
    OLE2.SET_PROPERTY(cell,'value',v_text);
    curcol := curcol + 1;
    END LOOP; -- Cursor Columns loop
    END LOOP; -- Cursor Rows loop
    -- Print End of Report
    currow := currow + 2;
    curcol := 3;
    olearg := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(olearg,currow);
    OLE2.ADD_ARG(olearg,curcol);
    cell := OLE2.GET_OBJ_PROPERTY(obj,'cells',olearg);
    ole2.SET_PROPERTY(cell,'value','***End of Report***');
    OLE2.RELEASE_OBJ(obj); -- Release the object
    END;

    You could probably use the built-in DDE or OLE2 packages to do this (although you may run into problems having reports close after invoking excel).
    I don't have any sample code for this though, so you'd need to review the DDE and OLE APIs that Excel provides to see if it's applicable.
    Incidentally, in 6i it's possible to run a report on the web, return a csv file and have Excel automatically open (assuming the mimetype is set correctly). You may want to look closer at this solution (which would require an upgrade).
    Hope this helps,
    Danny

  • How to use DDE package in form 10g module

    Hi All,
    I am using DDE.package in form 10g for uploading excels data in oracle database at windows platform but it is showing non-oracle exception.
    Thanks

    hi
    mehwish............just do for attachment.......
    u can also use something like this...
    Execute send_mail;and also.
    try something like this..
    example:
    begin
    mahi.mail('email address','subject','message','attachment');
    end;Edited by: Sarah on Apr 18, 2011 10:25 AM

  • Using DDE to create an Excel spreadsheet from forms

    I'm able to write text to the sheet, but I've not been able to find a way to automatically set the width of the columns based on my data. It would be a big help if someone could even just point me to the correct manual to read.
    Thanks,
    Ron

    OLE2 Package similar to client_ole2He didn't talk a bout an OLE2-package similar to client_ole2. He talked abouit THE OLE2-package (which in fact is the same which is called "behind the scene" in client_ole)
    If your OAS is located on a windows-machine, you can use the standard-OLe"-package from forms. But, for that, all operations are executed on the server. So, if for example you do OLE-operations on excel, excel will be started on the server. WIth that, there will be no choice for a user to "interact" when something goes wrong and there are some Excel-fragment snot correctly closed. So, i would be cautious to use this, especialy if you have a lot of users.

  • Exporting Data from Forms to Excel

    Hi,
    How can I export the data from Forms to Excel like which Export function in the Oracle Applications.
    Thank you,
    Voon

    Hello,
    By using dde package you can export the data from Form to Excel. Here is the sample code which i have used. you can write this code in the when_button_pressed trigger.
    declare
    appl_name varchar2(255);
    channel_id pls_integer;
    application_id pls_integer;
    x number;
    y number;
    V_TIME VARCHAR2(30);
    begin
    if :global.application_id is not null then
    message('Application already open');
    else
    appl_name := 'c:\program files\microsoft office\office\excel.exe';
    :global.application_id := dde.app_begin(appl_name,dde.app_mode_normal);
    end if;
    if :global.channel_id is not null then
    message('Communication channel already established.');
    elsif :global.application_id is null then
    message('Application must be launched first.');
    else
    :global.channel_id := dde.initiate('excel','book1');
    end if;
    DDE.POKE(:global.channel_id,'R1C1','Col1 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C2','Col2 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C3','Col3 Heading',DDE.CF_TEXT,1000);
    FIRST_RECORD;
    X := No of Records;
    for y in 2..x
    loop
    launch_excel is a program unit--
    launch_excel(y,:global.channel_id,:block.item1,:block.item2,::block.item3);
    next_record;
    end loop;
    FIRST_RECORD;
    EXCEPTION
    WHEN DDE.DDE_APP_FAILURE THEN
    MESSAGE('Could not launch application for DDE operations.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DDE_INIT_FAILED THEN
    MESSAGE('Could not initialize DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
    MESSAGE('Could not establish DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN OTHERS THEN
    MESSAGE('Error: '| |TO_CHAR(SQLCODE)| |' '| |SQLERRM);
    RAISE FORM_TRIGGER_FAILURE;
    END;
    LAUNCH_EXCEL
    PROCEDURE LAUNCH_EXCEL(
    y in number,
    channel_id pls_integer,
    param1 varchar2,
    param2 VARCHAR2,
    param3 varchar2) IS
    v_rowno varchar2(20) := 'R'| |y;
    BEGIN
    dde.poke(channel_id,v_rowno| |'C1',col1,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno| |'C2',col2,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno| |'C3',col3,dde.cf_text,2000);
    EXCEPTION
    when others then
    message('Error --'| |sqlcode| |sqlerrm);
    message('Error --'| |sqlcode| |sqlerrm);
    raise form_trigger_failure;
    END;
    null

  • How to export database image from form 9i to excel??

    I hv some image sotred as blob in database and want to export them from form to excel
    here is my code:
    DECLARE
    MyApplication 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;
    args1 OLE2.LIST_TYPE;
    args2 OLE2.LIST_TYPE;
    pictures OLE2.OBJ_TYPE;
    picture OLE2.OBJ_TYPE;
    BEGIN
    --INITIAL CODE ESTABLISHING THE Excel Object and Workbook/Worksheet
    MyApplication := OLE2.CREATE_OBJ('Excel.Application');
    OLE2.SET_PROPERTY(MyApplication , 'Visible',1);
    workbooks := OLE2.GET_OBJ_PROPERTY(MyApplication ,'Workbooks');
    workbook := OLE2.INVOKE_OBJ(workbooks,'Add');
    ---- START Code to create a work sheet and name it as WorkInstruction ---
    worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    worksheet:=OLE2.INVOKE_OBJ(worksheets,'Add');
    OLE2.SET_PROPERTY(worksheet , 'Name','WorkInstruction');
    OLE2.SET_PROPERTY(MyApplication , 'ActiveSheet','WorkInstruction');
    ---- END Code to create a work sheet and name it as WorkInstruction ---
    worksheets := OLE2.GET_OBJ_PROPERTY(MyApplication ,'ActiveSheet');
    OLE2.SET_PROPERTY(worksheets , 'Value','WorkInstruction');
    args := OLE2.CREATE_ARGLIST;
    --- For Writing Image ---
    pictures:=OLE2.INVOKE_OBJ(worksheet,'Pictures');
    args2:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args2, 'images.img');<---- it works only on local path/ url???
    picture:=ole2.get_obj_property(pictures,'Insert', args2);
    OLE2.DESTROY_ARGLIST(args2);
    args1 := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args1, 'C:\Documents and Settings\YinHan.Chan\Desktop\EXAMPLE.xls');
    OLE2.DESTROY_ARGLIST(args1);
    ole2.release_obj(picture);
    ole2.release_obj(pictures);
    ole2.release_obj(workbook);
    ole2.release_obj(workbooks);
    ole2.release_obj(worksheets);
    ole2.release_obj(worksheets);
    OLE2.RELEASE_OBJ(MyApplication);
    END;
    Please help
    thanks
    Message was edited by:
    user570542

    I am not seeing where you actually get the image from the db to Excel ...... all what you are doing is passing a file name, but did you already download the file to client machine? if so, consider giving full path instead of file name only !

  • Export data from forms to excel

    HI
    In my application im trying to export data from forms to excel.Everything works fine.First of all im using get_file_name for selecttion of file and passing it to ole2 package as follows
    FILENAME := GET_FILE_NAME(File_Filter=> 'XLS Files (*.xls)|*.xls|',dialog_type=>SAVE_FILE);
         ARGS:=OLE2.CREATE_ARGLIST;
         oLE2.ADD_ARG(ARGS,Filename);
         OLE2.INVOKE(WORKSHEET,'SAVEAS',ARGS);
    The problem is if i select an existing file the get_file_name itself raises one message ".....file already exists Replace an existing file?"
    Similarly the excel also also raises the same message "".....file already exists Replace an existing file?".I want to suppress atleast one of them? Could anyone help for this problem?
    appreciate ur help
    THANKS

    Looks like...
    ole2.set_property( ex_app, 'DisplayAlerts', false );
    where "ex_app" variable Excel Application -
         ex_app:=     ole2.create_obj('Excel.Application');
    and more Question:
    When i close excel app - in process viewer i see "excel.exe"
    ole2.release_obj don't work :(

  • Running JSP Excel report from Forms 10g

    Perhaps this had been discussed before, though I didn't find an exact solution.
    We have a JSP report that displays data in MS Excel. Works fine if called from the url.
    The report shall be called from the form passing a parameter list with PARAMFORM=NO.
    Problem: reports runs as designed but opens up an empty Excel spreadsheet. No errors, no data..
    We are using RUN_REPORT_OBJECT with desformat=spreadsheet and paramform=no.
    We can't use just web.show_document alone since quite a few parameters need to be passed.
    I've read in one of the posts that a paper layout need to be created (in addition to web layout) to run RUN_REPORT_OBJECT. We've done that, but now it does not open EXCEL, and displays paper layout in a browser.
    So, how to call JSP (Excel) report from Forms passing parameter list without displaying the parameter form?
    Thank you

    What is the complete Application Server version you are using? Be sure you are using 10.1.2.2
    What platform and version is it installed?
    What version of Excel is installed on the client?
    Does it work if you use an RDF report?
    Try this:
    o Change DESFORMAT to DELIMITED
    o Append the following to the end of the URL created in the WEB.SHOW call:
    &mimetype=application/vnd.ms-excel
    The result should be the same as using SPREADSHEET.

  • Help read excel path from forms 4.5

    i have trigger on when-button-pressed which opens excel file whit HOST like
    host('"C:\Program Files\Microsoft Office\OFFICE11\excel.exe" '||cFileName);
    My question is: How to read excel path from forms 4.5 whitout any utility or extra pll, because excel.exe is not always on path C:\Program Files\Microsoft Office\OFFICE11
    thanks

    Storing the path of excel in some kind of file or db-table is not a good solution, for this may change with any version of excel.
    Let the operating system decide on its on, just call
    HOST('rundll32.exe url.dll, FileProtocolHandler "' || vcFile || '"');
    where vcFile is the file you want to open

  • Loading data from forms 6i to excel

    I am trying to load data from forms 6i to excel. Everything is working, except excel spreadsheet do not release from memory.
    The ole2.release_obj(cell); ... and so on does release obj but does not release excel.exe from memory. So if you will go to a task manager you will be able to see as many excel.exe processes as you loaded data. Can anybody let me know what to do?
    Thanks
    null

    Maybe this will help.
    http://www.orafaq.com/forum/t/32129/0/

  • How to simulate DDE in Web Forms?

    Surely there is some elegant way to do DDE in a Web Forms (6i)environment?
    Given that Forms 7i will only support internet deployment and not C/S, there must be some "migration path" to replace the functionality of DDE in the C/S environment.
    My need is a button on a Web Form to dynamically insert data from 8i server into an Excel "template" spreadsheet, then open the spreadsheet on the client. The user can then manipulate data in the spreadsheet. A button in the spreadsheet to synchronize the spreadsheet changes back to the 8i server and exit the spreadsheet and return to the Web Form.
    Forms Server 6i is running on Solaris 2.6
    Any ideas on techniques to do this?
    Can Oracle COM Automation or Oracle Objects for OLE (OO4O) do the dynamic inserting of data into the excel template spreadsheet? (I don't know the difference between these??)
    I know web.show_document can be used with a URL to the spreadsheet on the web server (IIS) and the MIME type will launch excel on the client and copy the file to the client.
    How then can I get the updated cells back into 8i from the spreadsheet?

    Magesh,
    the issue of a SSO protected form showing the logon dialog is a knwon issue for Windows200 and the Oracle9iAS base release. If you applied Forms Patch 1 then this should be solved. Hope that I am right in that you are using Oracle9iAS and not Oracle9iDS. Do you see the Single Sign-On logon screen or the Forms logon dialog directly? Check the forms90.conf file in teh forms90/server directory as this contains the Form sso settings (mod_osso) which by default is commented out and therefore inactive. You need to remove the commenting '#' characters and make sure that each sentence having a '#' in front, after that starts on a new line.
    The Forms deployment documentation within the Oracle9iAS docu provides this information too.
    Frank

  • Word macro from Forms

    How can I start a macro in Word from Forms with the DDE-package? For Excel I use this command ('update' is the macro-name):
    DDE.Execute(ConvID, [run "'test.xls!update"]', 10000);
    Does anybody know the right approach for a Word macro?
    Thanks.
    null

    You should use OLE2 instead of DDE.
    Use this procedure if you're using Word version >= 97:
    PROCEDURE RUN_MACRO(cMacroName VARCHAR2) IS
    objWordApp OLE2.OBJ_TYPE := OLE2.CREATE_OBJ('WORD.APPLICATION');
    objArgList OLE2.LIST_TYPE := OLE2.CREATE_ARGLIST;
    BEGIN
    OLE2.ADD_ARG(objArgList,cMacroName);
    OLE2.INVOKE(objWordApp,'Run',objArgList);
    OLE2.DESTROY_ARGLIST(objArgList);
    OLE2.INVOKE(objWordApp,'QUIT');
    OLE2.RELEASE_OBJ(objWordApp);
    END;
    you can contact me for further explanation.
    Carlos

  • DDE error in Forms 4.5 running Win2k

    We are upgrading our O/S from Win95 to Win2k and we have several forms that creates a .csv file using TEXT_IO package and calls Excel using the DDE package. It works fine on Win95 but when we run it under Win2k it gives me problems.
    Right now we:
    <cut>
    v_app_location := 'C:\MSOFFICE\Office\excel.exe C:\Starsrpt\daylcnsrpt.csv';
    AppID := DDE.APP_BEGIN (v_app_location,DDE.APP_MODE_MAXIMIZED);
    <cut>
    Now the location of Excel is changing in Win2k, so once I made the directory path change it falls into the DDE.APP_FAILURE excpetion:
    <cut>
    v_app_location := 'C:\Program Files\Microsoft Office\Office\EXCEL.EXE c:\starsrpt\daylcnsrpt.csv;
    AppID := DDE.APP_BEGIN (v_app_location,DDE.APP_MODE_MAXIMIZED);
    <cut>
    I know that while using the DDE.APP_BEGIN, the first indication of a space means that the next string of characters is used as the file in which to open within the aforementioned application (Excel). Is this the reason for the error to occur and if so, what is the work around? (I have tried concatinating the CHR(32) value (ASCII of ' ' (SPACE)) and it falls into the same error. Any ideas would be great.
    Thanks.
    joel

    Joel I think you'll have to use the short name for "program files" e.g. the version you'd get in a Dos "DIR /x" command - something like "progra~1"

  • How do I get PDF forms to export to excel in the desired order?

    How do I get PDF forms to export to excel in the desired order?
    Here is what I have done:
    As taken from another post:
    Choose Forms > Manage Form Data > Merge Data Files Into Spreadsheet.
    In the Export Data From Multiple Forms dialog box, click Add Files.
    In the Select file Containing Form Data dialog box, select a file format option in File Of Type option (Acrobat Form Data Files or All Files). Then locate the form files that you want to merge into the spreadsheet, select them, and click Select.
    Repeat the previous step to add form data files that are in other locations, as needed.
    Click Export. Then select a folder and filename for the spreadsheet, and click Save.
    In the Export Progress dialog box, click either View File Now to open the spreadsheet file or Close Dialog to return to Acrobat."
         The problem now is that Adobe populates Excel in ABC order of the form, based off of the name of each box in the form. For example, if my form has three text boxes, named A, B, and C, then Adobe will export to Excel as such:
    Row 1 =         A                              B                              C
    Row 2 =         data entered             data entered              data entered
    where 'data entered' is whatever the user typed into the form boxes. But what if I want a different order for exporting, and I don't want to rename my text boxes? What if I want:
    Row 1 =         C                              B                              A
    Row 2 =         data entered             data entered              data entered   ?
    Is there a way to do this in acrobat x or xi?
    Thanks

    I don't have time to test right now, but there was a change with Acrobat 10 where it exports according to the tab order, which you may have to set manually, so give that a shot. Otherwise, you'll have to process the file after it's exported if you need the fields in a particular order. This wouldn't be too difficult to do with something like a VBS or JS script in Windows.

  • How to upload the data from two sheets in one excel into SAP

    Hi experts,
                    My requirement is to upload the data from two sheets in an excel into an internal table.How can this be achieved.Is some OLE application has to be used?
    Thanks
    Abhishek

    Hi
    see this program will upload excel file to application.
    *& Report  ZSD_EXCEL2
    REPORT  ZSD_EXCEL2.
    types: begin of ttab ,
          fld1(30) type c,
          fld2(30) type c,
          fld3(30) type c,
          fld4(30) type c,
          fld5(30) type c,
          end of ttab.
    data: itab type table of ttab with header line.
    selection-screen skip 1.
    parameters: p_file type localfile default
                'C:\test.xls'.
    selection-screen skip 1.
    at selection-screen on value-request for p_file.
      call function 'KD_GET_FILENAME_ON_F4'
           exporting
                static    = 'X'
           changing
                file_name = p_file.
    start-of-selection.
      clear itab. refresh itab.
      perform upload_data.
      loop at itab.
        write:/ itab-fld1, itab-fld2, itab-fld3, itab-fld4, itab-fld5.
      endloop.
    * Upload_Data
    form upload_data.
      data: file type  rlgrap-filename.
      data: xcel type table of alsmex_tabline with header line.
      file = p_file.
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           exporting
                filename                = file
                i_begin_col             = '1'
                i_begin_row             = '1'
                i_end_col               = '200'
                i_end_row               = '5000'
           tables
                intern                  = xcel
           exceptions
                inconsistent_parameters = 1
                upload_ole              = 2
                others                  = 3.
      loop at xcel.
        case xcel-col.
          when '0001'.
            itab-fld1 = xcel-value.
          when '0002'.
            itab-fld2 = xcel-value.
          when '0003'.
            itab-fld3 = xcel-value.
          when '0004'.
            itab-fld4 = xcel-value.
          when '0005'.
            itab-fld5 = xcel-value.
        endcase.
        at end of row.
          append itab.
          clear itab.
        endat.
      endloop.
    endform.

Maybe you are looking for