Call excel from report6i

Hi
Is there anyway to call excell from Reports6i.if it is please tell me how
Thnks
Kamaraj

Of course it can be done!!!!
The way to do it is using OLE2 Built In Package.
This is the way of call Word from Forms, but it also works for Report and Excel.
HOW TO - Performing OLE on the client using WebUtil
Introduction
Many Forms applications utilize OLE to perform tight integration with the Windows desktop. However, when moving your Forms application to the Web, the calls to OLE are now running on the application server and not the client machine.
Typically you need OLE to access the machine at which the user is sitting and integrate with the OLE services on the client. For example, loading data into an Excel worksheet and display for the user.
WebUtil provides you the functionality to perform client side OLE integration from within the Forms Java applet.
Set up
For the steps to set up WebUtil, please refer to the WebUtil Familiarization Manual available as part of the software download.
Changing code
Consider the following code:
DECLARE
app OLE2.OBJ_TYPE;
docs OLE2.OBJ_TYPE;
doc OLE2.OBJ_TYPE;
selection OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
BEGIN
-- create a new document
app := OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY(app,'Visible',1);
docs := OLE2.GET_OBJ_PROPERTY(app, 'Documents');
doc := OLE2.INVOKE_OBJ(docs, 'add');
selection := OLE2.GET_OBJ_PROPERTY(app, 'Selection');
-- insert data into new document from long item
OLE2.SET_PROPERTY(selection, 'Text', :long_item);
-- save document as example.doc
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'c:\temp\example.doc');
OLE2.INVOKE(doc, 'SaveAs', args);
OLE2.DESTROY_ARGLIST(args);
-- close example.doc
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 0);
OLE2.INVOKE(doc, 'Close', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(selection);
OLE2.RELEASE_OBJ(doc);
OLE2.RELEASE_OBJ(docs);
-- exit MSWord
OLE2.INVOKE(app,'Quit');
END;
This code opens a Word document to the user and inserts data from a Forms text field into that Word document before saving and closing the file. To perform the same functionality, but on the client side when deployed on the Web, attach the WebUtil object library and PL/SQL library, and replace any instance of OLE2 with CLIENT_OLE2.
The resulting code will now work, as before, but write the file to the client machine.
DECLARE
app CLIENT_OLE2.OBJ_TYPE;
docs CLIENT_OLE2.OBJ_TYPE;
doc CLIENT_OLE2.OBJ_TYPE;
selection CLIENT_OLE2.OBJ_TYPE;
args CLIENT_OLE2.LIST_TYPE;
BEGIN
-- create a new document
app := CLIENT_OLE2.CREATE_OBJ('Word.Application');
CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
docs := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Documents');
doc := CLIENT_OLE2.INVOKE_OBJ(docs, 'add');
selection := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Selection');
-- insert data into new document from long item
CLIENT_OLE2.SET_PROPERTY(selection, 'Text', :long_item);
-- save document as example.doc
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, 'c:\temp\example.doc');
CLIENT_OLE2.INVOKE(doc, 'SaveAs', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
-- close example.doc
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, 0);
CLIENT_OLE2.INVOKE(doc, 'Close', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.RELEASE_OBJ(selection);
CLIENT_OLE2.RELEASE_OBJ(doc);
CLIENT_OLE2.RELEASE_OBJ(docs);
-- exit MSWord
CLIENT_OLE2.INVOKE(app,'Quit');
END;

Similar Messages

  • Call excell from RDF

    Hi
    can anyone help me how to call excell from RDF in reports6i (means i want to call reports in excel format)
    Thank you
    Kamaraj
    Edited by: user615671 on Jan 28, 2009 8:12 PM

    Hi,
    Google "concsub"
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • How to open or call Excel from an Oracle Form in Apps11i

    I have a custom form in Apps 11i from which I need to be able to open an Excel spreadsheet. I'm aware that it is possible to a spreadsheet that is available on the local drive from a form, but can it be done from Applications ?

    If you do by yourself, you may call report in excel format, as of editing and saving back to database, you may need think other ways.
    webutil may be hhepful.

  • Calling Excel from reports

    Dear all,
    From the report runtime preview is it possible to export the data displayed to excel thru OLE2 or any other method.
    Is it at all feasible..the how..
    Using reports 6i
    pl. email also to [email protected]
    regards,

    Hi ,
    try with generate file to delimited.
    So that you can get .csv file.
    --Basava.S                                                                                                                                                                                   

  • Xcelsius suddenly only allows chart to call data from first excel worksheet

    Hi
    I'm using Xcelsius 2008 Engage with SP1 FP3 installed.
    I have never had this problem before, but in the last week, Xcelsius won't allow a chart to call data from any worksheet in the excel file other than the first worksheet. If I reorder the worksheets in the excel file, i can access a different worksheet, but only the one that is saved as the first worksheet (left most tab).
    In dashboards i have already created, i can't change the data range of a chart that's already calling data from a worksheet unless i select the first worksheet.
    Could this be an automatic update from microsoft? Has anyone else experienced this and worked out how to overcome it? It is frustrating to keep moving the worksheet to the front and reimporting the data everytime i want to make a change that isn't in the first excel worksheet.
    Thanks,
    Scott.

    As far as I remember it's not possible. Thus, find attached VI and use it to convert line/column to excel cell format. It's working if you are not using more than 26 columns (i.e. column AA, AB, ... if this is the case you have to improve it a little)
    Hope this helps
    Attachments:
    To_Cell_Format.vi ‏18 KB

  • Call Excel Macros function from Java

    Hi All,
    can u guide me How to call excel macros from java.
    The thing is first I have to enable macros and then call the macors function.
    Is this possible to call from Java. If yes guide me.
    Thanks in Advance

    Seems like something you'd have to do through COM.
    http://sourceforge.net/projects/jacob-project/
    HOW you do that is something you'll really have to figure out yourself, its not a Java question.

  • Calling MS Excel from Forms 6.0

    Can somebody tell me in detail how to call MS Excel from Oracle Forms. I would like to create a button on a form and when the user clicks the button, MS Excel should open and I need to populate all the relevant data into Excel spreadsheet.
    Thanks

    You will probably have to use the OLE2 package. Take a look at the demo oleexcel.fmb which comes with Developer 6.0 for some ideas on how to start. You might also want to look at the documentation Oracle produced on this topic for Forms 4.5. It may be old, but I believe it is still relevant. See:
    http://technet.oracle.com/products/developer/pdf/oleexcel.pdf
    Good Luck!
    Chris

  • Export to Excel from PL/SQL Procedure

    Hello,
    I am creating a report using PL/SQL and html code. Once the report is display, I click on "Export to Excel" button. it should open the new window with Excel. The window opens in Excel, but no data. I have following code
    as the first statement in the procedure.
    OWA_UTIL.MIME_HEADER ('application/vnd.ms-excel', FALSE);
    and this is the script
    <script language="JavaScript">
    var param_list
    l_param_list := l_param_list || '&p_app_main_id=' || p_app_main_id;
         l_param_list := l_param_list || '&p_from_date=' || p_from_date ;
         l_param_list := l_param_list || '&p_to_date=' || p_to_date ;
    htp.prn('
    param_list = ''');
    htp.prn( l_param_list);
    htp.prn('''
    function NewWindow(mypage,myname,w,h,scroll){
    var win = null;
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings = ''height=''+h+'',width=''+w+'',top=''+TopPosition+'',left=''+LeftPosition+'',scrollbars=''+scroll+'',resizable''
    win = window.open(mypage,myname,settings)
    win.focus();
    function ExportToExcel() {
    var wndname = ''ExpCodeMoveRep'';
    var wndw = screen.width-10;
    var wndh = screen.height-10;
    var wattr = ''scrollbars=yes,toolbar=yes,resizable=yes,menubar=yes'';
    var wndurl = ''pm_codemove_report?p_output=E'';
    wndurl = wndurl + param_list;
         NewWindow(wndurl,wndname,wndw,wndh,wattr);
    </script>
    My submit is
    htp.prn('
    <p align="center">
    <input type="button" class="printbutton" value="Close" class="button" OnClick="window.close();"> 
    <input type="button" class="printbutton" value="Export To Excel" class="button" OnClick="ExportToExcel();">');
    Can anyone tell me what is wrong.
    I have the same code in another schema and it is working fine. Both schema are on the same server. Do they have any set up on appserver in DAD file to be able to see the data in Excel?
    Thanks
    Yagna

    Thank you for your answer dccase!
    I decided to go with on demand process. I have trouble with calling procedure from (button URL - javascript:popupURL('#OWNER#.exportXML')) pop window which cause "Forbidden, The requested operation is not allowed" error. I read that this is because I'm using XE edition and there is no HTMLDB_PUBLIC_USER role in XE.
    Now, I use on demand process and button URL link:
    javascript:popupURL('f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=PLSQL_Export_XML:NO::')
    It is working. Now I have to find solution to automatically close popup window :-)
    Thanks!
    Marko

  • How to call excel macros programmatically in C#?

    Hi,
    I have a requirement where i need to call excel (2003) macros in C# program. Can anyone help me with a code snippet to do the same?
    The excel macro function takes two input parameters? how can the parameters be passed?
    Any code snippet to do the same in C# would be helpful.
    Thanks.

    Hey there, Sid.  I am tryin gto run your code, but I couldn't even gte it to fire.  Here's what I ahve now:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Excel = Microsoft.Office.Interop.Excel;
    namespace WindowsFormsApplication2
        public partial class Form1 : Form
            private void button1_Click(object sender, EventArgs e)
                //~~> Define your Excel Objects
                Excel.Application xlApp = new Excel.Application();
                Excel.Workbook xlWorkBook;
                //~~> Start Excel and open the workbook.
                xlWorkBook = xlApp.Workbooks.Open("C:\\Users\\Ryan\\Desktop\\Coding\\Microsoft Excel\\Work Samples\\Work Samples\\Historical Stock Prices.xlsb");
                //~~> Run the macros by supplying the necessary arguments
                xlApp.Run("ShowMsg", "Hello from C# Client", "Demo to run Excel macros from C#");
                //~~> Clean-up: Close the workbook
                xlWorkBook.Close(false);
                //~~> Quit the Excel Application
                xlApp.Quit();
                //~~> Clean Up
                releaseObject(xlApp);
                releaseObject(xlWorkBook);
            //~~> Release the objects
            private void releaseObject(object obj)
                try
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
                    obj = null;
                catch (Exception ex)
                    obj = null;
                finally
                    GC.Collect();
    When I hit the play button nothing happens.  When I hot F5 nothing happens.  Do you ahve any idea what I'm doing wrong.  I'd appreciate any advice with this!! 
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Calling Form from Report

    Hi all,
    Please help me out, I need to call Form6i form Report6i.
    Thanks in advance

    Hi all,
    the below mentioned documents will help u.
    Under Developer 2000 (Release 1.2) on Windows, there exists a pl/sql library
    which can be used to invoke excutables residing on the PC. The library
    (D2KWEXEC.PLL, located in the FORMS45/DEMO/REUSE directory) is attached to
    the Report in the following manner:
    1) Modify the D2KWEXEC.PLL to change any references to the Forms built-in
    MESSAGE to the Reports built-in SRW.MESSAGE.
    2) Choose the 'Attached Libraries' section for your report and select the
    'Navigator/Create' menu option - this will cause the 'Attached Library'
    dialog to be displayed.
    3) Use the 'Find' button to locate the library file (D2KWEXEC.PLL) and then
    attached it to the report using the 'Attach' button. A warning is
    displayed you that a hard coded path name is being used and gives the
    option of removing it. If the full path is removed, then the
    FORMS45_PATH variable will be used subsequently to locate the library.
    The directory in which the library is located must be part of
    FORMS45_PATH.
    Then select the appropriate trigger from where Oracle Forms should be invoked
    from. In that trigger reproduce the following code:
    function return boolean is
    command_string VARCHAR2 (100);
    BEGIN
    command_string := 'c:\orawin\bin\f45run.exe';
    RETURN d2k_winexec.execute (command_string);
    END;
    Note: 'command_string' contains the full path of the Oracle Forms
    Runtime executable.
    When the trigger fires, the Forms Runtime Executable is invoked
    automatically.
    Regards
    Gopinath M

  • How to download output of program2 to excel from program1......

    Hi,
             i have program1 and program2. i am calling program2 from program1 through submit (PROGRAM2) and return to program1. program2 using REUSE_ALV_HIERSEQ_LIST_DISPLAY to display output.   What my requirement is , i need output of program2 in excel format and saved in my PC by calling program1 having input paramete , programname  that would be program2.
    plz try to solve it.
    thanks.....
    saurin shah

    PART -II
    FORM get_titles.
      CREATE DATA data_titles TYPE ty_titles.
      ASSIGN data_titles->* TO <fs_titles>.
      <fs_titles>-title = 'Customer Number 1'.
      <fs_titles>-field = 'KUNNR'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'Country Key'.
      <fs_titles>-field = 'LAND1'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'Name 1'.
      <fs_titles>-field = 'NAME1'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'City'.
      <fs_titles>-field = 'ORT01'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'Region'.
      <fs_titles>-field = 'REGIO'.
      APPEND <fs_titles> TO t_titles.
      <fs_titles>-title = 'Address'.
      <fs_titles>-field = 'ADRNR'.
      APPEND <fs_titles> TO t_titles.
    ENDFORM.                    "get_titles
    FORM get_data.
      SELECT KUNNR LAND1 NAME1 ORT01 REGIO ADRNR
      INTO TABLE t_spfli
      FROM KNA1
      WHERE LAND1 EQ 'IN'
      and KUNNR EQ '0000700008'.
    ENDFORM.                    " get_data
    FORM create_excel.
      w_line = 1.
      CREATE OBJECT e_appl 'EXCEL.APPLICATION'.
      SET PROPERTY OF e_appl 'VISIBLE' = 1.
      CALL METHOD OF e_appl 'WORKBOOKS' = e_work.
      CALL METHOD OF e_work 'Add' = e_work.
      GET PROPERTY OF e_appl 'ActiveSheet' = e_activesheet.
      SET PROPERTY OF e_activesheet 'Name' = 'Customer Details'.
      LOOP AT t_spfli ASSIGNING <fs_spfli>.
        w_tabix = sy-tabix.
        w_line = w_line + 1.
        LOOP AT t_titles ASSIGNING <fs_titles>.
          w_titles = sy-tabix.
          CALL METHOD OF e_appl 'Cells' = e_cell
            EXPORTING
              #1 = 1
              #2 = w_titles.
          SET PROPERTY OF e_cell 'Value' =  <fs_titles>-title.
          GET PROPERTY OF e_cell 'Interior' = e_color.
          SET PROPERTY OF e_color 'ColorIndex' = 35.
          GET PROPERTY OF e_cell 'Font' = e_bold.
          SET PROPERTY OF e_bold 'Bold' = 1.
          CALL METHOD OF e_appl 'Cells' = e_cell
            EXPORTING
              #1 = w_line
              #2 = w_titles.
          CONCATENATE '<fs_spfli>-' <fs_titles>-field
          INTO w_field.
          ASSIGN (w_field) TO <fs>.
          SET PROPERTY OF e_cell 'Value' = <fs>.
          GET PROPERTY OF e_cell 'Interior' = e_color.
          SET PROPERTY OF e_cell 'ColumnWidth' = 20.
          SET PROPERTY OF e_color 'ColorIndex' = 0.
          GET PROPERTY OF e_cell 'Font' = e_bold.
          SET PROPERTY OF e_bold 'Bold' = 0.
        ENDLOOP.
      ENDLOOP.

  • Excel from JAVA or C++ --  Urgent -- help

    Hi
    I know it might not be possible, but i want to use couple of Financial Functions which excel provides within itself.
    Is there anyway i can use them from my JAVA or C++ code ?
    In short, would it be possible to call excel functions from JAVA or C++ code
    TIA
    Vikram

    Actually you can... In quite a few different ways. You can access any COM or OLE object in windows from within java by using the Java/COm bridge, or purchasing shrink wrapped products... The links are below:
    These people provide some very cool solutions for java. This link is specifically for excel.
    http://www.intrinsyc.com/pdfs/java-excel_bridge.pdf
    Some Resources for Java/COM...
    http://users.rcn.com/danadler/javacom/

  • Download to excel from portal

    Hi all,
    I am calling an ABAP program in an iView in the portal. The program has an function to download to Excel using function module XXL_SIMPLE_API. In the portal this results in a 'CNTL_ERROR' exception in program CL_GUI_FRONTEND_SERVICES. I have tried several function modules (SAP_CONVERT_TO_XLS_FORMAT, WS_EXCEL) but none of these can be used from the portal.
    Is there any function module or class that I can use to download data to excel from the portal??
    Thanks!
    Patrick

    I'm not specialist in that area but not surprised that it doesn't work, as these functions use OLE, and this is forbidden via internet navigator (security reasons I guess).
    Either download a simple CSV file (download any internal table using CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD method),
    or if you really want to make special things, look at ActiveX and ACF sap notes, and also demo web dynpro ios_test_helloworld_ms (office integration), but I don't have more info.

  • No response when export EXCEL from Mapping in FDM

    Dear All,
    I am using FDM 11.1.1.3. And, install as usual.
    I cannot export Excel from Mapping in FDM.
    The screen is just keep waiting for long long time.
    How to fix it? Thanks for all.
    Karen

    We did have a bug in older versions of smartview where it was not possible to deinstall it. Smartview was removed but any attempt to install a new version failed. This was because Smartview creates a Registry entry in:
    HKEY_CURRENT_USER\Software\Microsoft\Installer
    and adds the key
    C:\DOCUME~1\USERNAME\LOCALS~1\Temp\_is3EA\
    which then prevents any newer version of SmartView to be installed
    I looked on my machine and the is3EA file does not exist, however there is an installer file called isA.exe
    The registry entries for smartview are found under HKEY_CURRENT_USER\Software\Hyperion Solutions\Hyperion Smartview - maybe you could try deleting these entries? --> solution works.
    Edited by: user9378541 on 27-sep-2010 2:45

  • Call BEx from function modules.

    Hi,
    I'm trying to run BEx (Excel) from an abap Exit. Using the debugger I have observed that it is necessary to call the rsah_launch_excel function module passing some parameter (i.e. workbook id) but don't know if it is necessary to copy and modify the called program ( RRMX_START_EXCEL).
    Any suggestion about the coding will be well appreciated.
    Thanks in advance.
       Giovanni

    Use SUBMIT Program statement ... i.e,
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/submit.htm

Maybe you are looking for

  • Error while Releasing a transport request - DSO 0SD_O03: Active version

    Hi all, I am getting below error when I am trying to release a transport request. Object ODSO 0SD_O03: Active version differs from modified version. I activated DSO again,but I was not successful to correct the error.Please help me correcting this er

  • How do I move some photos to another catalog?

    I can see how to export to a catalog - this making a new catalog. But how do I move photos or export them to a current catalog. What I am trying to do is split my catalog which is getting a little big into 2 or three others. What's your recommendatio

  • Need help for array counting

    Any help for array question Hello to All: I want to tally or count some of the elements that I have in array but not sure how. I have for example: int myArray[] = {90,93,80,81,71,72,73,74};My objective is to tally all of the 90's, tally all of the 80

  • Printing function gets called twice..!

    The following is my class that prints a string array which sometimes goes into multiple pages.. The code in which i create the multiple pages is below this class.. the problem is each time i append a new page to the book the print function in the cla

  • No import pane in iTunes preferences 5.0.1

    I have recently updated iTunes on two of my macs. Am I missing something or do I not have the ability to set the bit rate for importing. The only panes that are available in iTunes preferences are "General", 'iPod', 'Podcasts', 'Playback' which is ne