Getting Excel data from forms 6i

Hi Andrew,
I am a good looking woman, could you please send me the routine or .fmb file which performs the reading and writing of data through forms 6i as you discussed on that forum.
I will really appreciate if you can send this to my email address.
[email protected]
Have a nice day.
Malan

hi
don't mind why u write u r a good looking woman. u just poet ur question. this is education fouram ok .just pur ur question ..
ur answer is
DECLARE
APPID PLS_INTEGER;
CONVID PLS_INTEGER;
x number:=1;
BEGIN
APPID := DDE.APP_BEGIN('C:\Program Files\Microsoft Office\Office10\excel.exe',dde.app_mode_normal);
CONVID := DDE.INITIATE('EXCEL','system');
DDE.EXECUTE(CONVID,'[Save.as("c:\test1.xls",1)]',10000);
DDE.TERMINATE(CONVID);
CONVID := DDE.INITIATE('EXCEL','c:\test1.xls');
go_block('dept');
first_record;
loop
go_item('deptno');
for y in 1..3 loop
DDE.POKE(CONVID,'R'||x||'C'||y,ltrim(rtrim(:system.cursor_value)),DDE.CF_TEXT,1000);
     next_item;
end loop;
x:=x+1;
next_record;
end loop;
DDE.EXECUTE(CONVID,'[Save()]',10000);
DDE.TERMINATE(CONVID);
DDE.APP_END(APPID);
exception
     when others then
DDE.EXECUTE(CONVID,'[Save()]',10000);
DDE.TERMINATE(CONVID);
DDE.APP_END(APPID);
END;
write code when-button-pressed trigger
Rizwan
[email protected]

Similar Messages

  • 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 :(

  • 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

  • What is the easiest way to get the data from the mailmerge to form Pages files that can be saved separately?

    Using Iwork 09 I have spent several hours setting up a mail merge from a spread sheet in Numbers to create receipts for my customers from a Pages template.
    After the merge I am left with one long Pages document that will not save as separate files; one per customer, it will only save the whole document of several receipts.
    What is the easiest way to get the data from the mailmerge to form Pages files that can be saved separately?
    Many thanks in advance.
    Richard

    Mr. Clark,
    You will probably be more pleased with the iWork apps when you begin to learn your way around. Until you learn such basic things as how to print only one page of a document, you will probably continue to be disappointed.
    Does your Print dialog look like this:
    Or like this:
    If it looks like the first one, then you will want to click this expander control:
    Regards,
    Jerry

  • Get the data  from excel and insert into the database

    I want to read the data from excel file, get the data from excel and insert into the database.

    You can use the Apache POI HSSF API to read data from Excel files and you can use the Sun JDBC API to insert data in database.
    This has nothing to do with JSP/JSTL.

  • 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/

  • Not able insert ,query data from forms

    hi,
    I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
    should i do anything to insert record.please help

    the block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
    There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
    Craig...

  • How to get useful data from request?

    Hello.
    I am looking for creating a management tool for a web site. All I want is that is there any ready to use API or package or open source project for retrieving user�s information? I just mean that is there any easy to use way in java to get useful data from a client (for example location, his or her system configuration and information �).
    Thanks.

    If you dump all the data from request (see the javadoc, and especially the "header methods" ) you'll see the data you can get are quite simple.
    The only thing you can try to rely on are ;
    - the IP address from the sender (when reversed to DNS, you can sometime use the tld to locate the country it comes from. Yet, you'll get many .com name, so it's not that significant. it may also give you the IAP used). Note that if the user is using a proxy, it's the proxy IP that you'll collect
    - the User-Agent header : from this, you can guess the OS and the browser used
    - the Referer header : usefull to get where your user comes from (where they found a link to your site)
    - the Cookie header : if you're using a servlet container with session id stored in cookie, you should see the Cookie header appear on the second request to your site. That helps finding out wether your user accep cookie or not (from a server point).
    Besides these, i don't think you can get any other useful data without asking your users on a form. Note that it's the client that decides to send Referer, User-Agent or Cookie headers. Those are not mandatory to the Http Protocole and some browser allow their user to fool their content (butmore than 90% of the widespread browsers don't)

  • How to get purchasing data from SAP R/3 to Flat files

    Hi,
    Please can anyone help me to get the data from Purchasing extractors (2LIS_02_ITM, 2LIS_02_SCL, 2LIS_02_S012) to flat files? Here we dont want to load data from R/3 to BW for reporting, wanted to load data from flat files to OWB (Oracle warehouse builder) for reporting.  So Is there anyway to generate data into flat files from Purchasing extractors (Full and deltas)?
    Thanks,
    Pavan.

    Hello,
    here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
    Regards
    Walter Habich
    REPORT habitest2 LINE-SIZE 255.
    TYPES:
      strtab_t TYPE TABLE OF string.
    CONSTANTS:
      separator VALUE ';'.
    DATA:
      it_s012 LIKE s012 OCCURS 0,
      wa_s012 LIKE s012,
      strtab TYPE strtab_t,
      strele TYPE string.
    SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
    PERFORM data_to_string
      TABLES
        strtab
      USING
        'S012'. "requires it_s012 and wa_s012
    LOOP AT strtab INTO strele.
      WRITE: / strele.
    ENDLOOP.
    *&      Form  data_to_string
    FORM data_to_string TABLES strtab TYPE strtab_t
                        USING  ittab TYPE any.
      DATA:
        h_zaehler TYPE i,
        line_str TYPE string,
        l_tabellenname(10) TYPE c,
        l_arbeitsbereichsname(10) TYPE c,
        h_string TYPE string,
        h_char(255) TYPE c.
      FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
                     <l_arbeits> TYPE ANY,
                     <feldzeiger> TYPE ANY.
      CLEAR strtab.
      CONCATENATE 'IT_' ittab INTO l_tabellenname.
      ASSIGN (l_tabellenname) TO <l_tabelle>.
      CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
      ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
      LOOP AT <l_tabelle> INTO <l_arbeits>.
        CLEAR: h_zaehler, line_str.
        line_str = ittab.
        DO.
          ADD 1 TO h_zaehler.
          ASSIGN COMPONENT h_zaehler OF
            STRUCTURE <l_arbeits> TO <feldzeiger>.
          IF sy-subrc <> 0. EXIT. ENDIF.
          WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED.          "#EC *
          h_string = h_char.
          CONCATENATE line_str separator h_string INTO line_str.
        ENDDO.
        APPEND line_str TO strtab.
      ENDLOOP.
    ENDFORM.                    "data_to_string

  • How to get purchasing data from SAP R/3 to OWB (Oracle warehouse builder).

    Hi,
    My name is Pavan Tata. I work as a SAP BW developer. Here is the situation at my client place. Client decided to retire BW system and wants to replace with OWB(Oracle warehouse). In all this currently we have purhchasing application in BW production system and wants to move this application to OWB for the same type of reporting what they are getting currently.
    Here is my question:
    How to get purchasing data from SAP R/3 to OWB(Warehouse) with initial full loads and deltas mechanism in the same way as we do in BW.
    Please help on this, also send me any documentation about this if you have.
    Thanks,
    Pavan.

    Hello,
    here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
    Regards
    Walter Habich
    REPORT habitest2 LINE-SIZE 255.
    TYPES:
      strtab_t TYPE TABLE OF string.
    CONSTANTS:
      separator VALUE ';'.
    DATA:
      it_s012 LIKE s012 OCCURS 0,
      wa_s012 LIKE s012,
      strtab TYPE strtab_t,
      strele TYPE string.
    SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
    PERFORM data_to_string
      TABLES
        strtab
      USING
        'S012'. "requires it_s012 and wa_s012
    LOOP AT strtab INTO strele.
      WRITE: / strele.
    ENDLOOP.
    *&      Form  data_to_string
    FORM data_to_string TABLES strtab TYPE strtab_t
                        USING  ittab TYPE any.
      DATA:
        h_zaehler TYPE i,
        line_str TYPE string,
        l_tabellenname(10) TYPE c,
        l_arbeitsbereichsname(10) TYPE c,
        h_string TYPE string,
        h_char(255) TYPE c.
      FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
                     <l_arbeits> TYPE ANY,
                     <feldzeiger> TYPE ANY.
      CLEAR strtab.
      CONCATENATE 'IT_' ittab INTO l_tabellenname.
      ASSIGN (l_tabellenname) TO <l_tabelle>.
      CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
      ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
      LOOP AT <l_tabelle> INTO <l_arbeits>.
        CLEAR: h_zaehler, line_str.
        line_str = ittab.
        DO.
          ADD 1 TO h_zaehler.
          ASSIGN COMPONENT h_zaehler OF
            STRUCTURE <l_arbeits> TO <feldzeiger>.
          IF sy-subrc <> 0. EXIT. ENDIF.
          WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED.          "#EC *
          h_string = h_char.
          CONCATENATE line_str separator h_string INTO line_str.
        ENDDO.
        APPEND line_str TO strtab.
      ENDLOOP.
    ENDFORM.                    "data_to_string

  • Problem in getting EXCEL data using I_OI_SPREADSHEET

    Hello All,
    My requirement is to read data from Excel document having multiple worksheets. I am successful in getting all worksheets in the excel using the method spreadsheet->select_sheet.
    Now I face problems while using spreadsheet_get_ranges_data. I dont have any range to select from the worksheets. When my program executes contents internal table which is importing paramater from get_ranges_data method is not getting me data from EXCEL.
    Can you please give me hint or solution to solve this issue.
    Best Regards,
    Krishna
    [email protected]

    Hello Norman,
    Thanks for your response. But the solution is not really working for my case.
    Step1: call class method spreadsheet->select_sheet
    Step2: call class method spreadsheet->get_active_sheet
    Step3: call class method i_oi_document_proxy->select_all
    Step4: call class method spreadsheet->get_selection
    Step5: Call class method spreadsheet->insert_range_dim
            passing parameters selected from step 2.
    But the problem is parameters (top,left,rows,columns) values supplied in step 3 is not giving me correct rows,columns that is in my EXCEL worksheet.
    I have 3 rows and 3 columns, but I get 1 row and 1 column and 26 as top.
    Let me know whether I am doing anything wrong in my calls to class?!.
    Best Regards,
    Nagendra Krishna
    [email protected]

  • Shifting of data from forms to word (arabic)

    In one of our ongoing project we need to pass some data from forms to
    word document , in some cases the Shifting of data takes Place mostprobably when we used / character . The Format of data in Arabic and English .
    example:-
    T C 3/5
    get shifted into T C 5/3
    character . the data in arabic and english.
    Any conclusion.
    Regards

    hi
    do u have any Idea abou calling a Function Module (F.M)..
    1.The form interface in the smart form do the same as Functionmodule interface..
    2.when u r running the Smartfrom means u need to send some data to the smartforms and u will get some return parameters... this form interfaces do the same...i) Import tab in form interface is used give some inputs to the form
              ii) Export tab in form interface is used return some inf Form Smartform to Calling Program.
            iii) the Table tab is used to send the Internal table data.
    3.retriving data form Database table... u can achive this in two ways..
          i) selectin data in drivere program or calling program and send that to Smart forms.
      ii) selecting the data in the smartforms... you can write the code in GLOBAL DIFINATIONS-->INITIALIZATIONS tab.. Note:!!! when u want to use intenal tables or variables in initialization tab.. u have to pass them in INPUT AND OUTPUT PARAMETERS of the INITIALIZATION tab.
    Please Close this thread.. when u r problem is solved
    Reward if Helpful
    Regards
    Naresh Reddy K

  • Carrying data from form to form

    Hi
    I have a problem with carrying data from form to form.
    Once a user logs in I want their name to appear on each screen of the application.
    I tried storing the name from the textfield using : textField.getString();
    But I keep getting an empty string as its picking up the blank textfield,
    How do I save the name that the user enters and be able to carry it on to all the other forms?
    Thank you for your help,
    Kind Regards

    According to my knowledge
    You have two options for storing login information.
    One way is to store Login info in the record store. but i think it is not a good one, as your session expires you should not require the login cache. so you should delete that data for better operations.
    Second option is to create a class which can act as a cache memory for your program.
    Follow these steps for this options.
    1. Create a cache class with all the public variables which you want to access.
    2. Create an object from main midlet of this class.
    3. Pass this object in each form with navigation.
    4. So every variable can be accessible from all the forms as object of this class is instantiated only once.
    Thank You.

  • How to get system date through forms 6i?

    Sir,
    I am trying to get system date in forms but i am getting some problem with it.
    My code is like this: I am using 6i forms with 10g database.
    SELECT SYSDATE INTO :VAR FROM DUAL;
    At the compilation it is giving error like
    ORA-00600 internal error argements
    can you help me please

    you can make this code instead of what you write in forms
    :VAR :=Sysdate;
    and make var variable of type date
    concern the error try to close the forms builder and open it again and recompile your form.
    hope this will help you

  • 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.

Maybe you are looking for

  • Jabber Click to Dial via Cisco IP Phone not enabled - How to ?

    After installing Jabber for WIN i would like to know how i can enable "click to dial" for my desktop Cisco IP Phone ? With Webex connect this is working well but not with jabber currently and i can´t find the place to configure...please help...

  • Can't reinstall Snow Leopard on new MacBook Pro

    I had a old Macbook pro running Snow Leopard that died. I used Time Machine to restore to my brand new MacBook Pro. I decided to do an Archive and Install to start with a fresh system even though the new machine is working fine. The install disk is a

  • BPM 11g and Webcenter integration

    Hi, I have a lot of doubts about how to use BPM 11g 'inside' or integrated with Webcenter. I need some tutorials, links and docs if possible. thanks!

  • Applescript fails Evernote "create note"

    Several of my Applescript(s) that use the Evernote "create note" syntax are failing, since applying the latest Mavericks update.  Anyone else having this issue? When I open Hazel, which is triggering the scripts, the compiler (syntax checker) is thro

  • 2 iPhones 1 MobileMe (MAC) acct

    Just bought 2 3G iPhones, got mine sync'd - sort of. Trying to register wife's phone using same MobileMe account I used for my iPhone. Mid registration right now - I think this might not work since my first phone info auto-populated the webpage. Obje