Schedule workbooks - results to excel

Hello,
I know you can schedule workbooks through discoverer plus. The results from these can be found under File > Open > View: scheduled workbooks.
Is there anyway that these can be scheduled with the reults being output to excel?
Thank you
sarah

Pl see previous discussions on this topic - https://forums.oracle.com/forums/search.jspa?threadID=&q=schedule+AND+excel&objID=f56&dateRange=all&userID=&numResults=15
HTH
Srini

Similar Messages

  • Scheduled Workbook Results Are Not Available On Discoverer Plus

    My environment:
    OracleBI Discoverer 10g (10.1.2.2)
    Oracle Business Intelligence Discoverer Plus 10g (10.1.2.54.25)
    Discoverer Model - 10.1.2.54.25
    Discoverer Server - 10.1.2.54.25
    End User Layer - 5.1.1.0.0.0
    End User Layer Library - 10.1.2.54.25
    Platform Linux x86-64
    Hi All,
    I have been working through issues we have been having with our scheduling and I have noticed that we have the exact problem identified on Metalink note 457148.1. It advocates applying some patches:
    1.     Apply the Application Server 10g 10.1.2.2 patchset 2 Patch 4960210 plus the latest Discoverer cumulative patch per Note 237607.1 'ALERT: Required and Recommended Patch Levels For All Discoverer Versions'
    2.     This is also included in Application Server 10g 10.1.2.3 patchset 3 Patch 5983622.
    **** Non-patch Workaround ****
    Disable the Query Prediction: Edit pref.txt on the middle-tier server and set QPPEnable=0 and Execute the applypreferences script (.sh or .bat)
    My question: Has anyone done this workaround? We do not have a test box to test this before we make the change and we just went live with EBS R12 in April and I really do not need the additional excitement of trying to back-out of a failed patching.
    Thanks,
    Patrick

    Hi patrick,
    Here you are using 10.1.2.2.But i do suggest you to upgrade to 10.1.2.3 version because it handles most of the issues.
    You can go through it in michael's post.Here is the link
    [http://learndiscoverer.blogspot.com/2008/04/most-useful-patch-numbers.html]
    I really do not need the additional excitement of trying to back-out of a failed patchingFor any more suggestions on it i think our experts Micahel or Rod will help you.
    Best Wishes,
    Kranthi

  • Deleting the scheduled workbooks that are no longer valid - via script

    Hi,
    I would like to delete the results of the scheduled workbooks (created by users other than me) with scheduled workbooks status like 'Error while running query" or "Report Expired" or "EUL has changed, reschedule report". From Discoverer Administrator (version: 10.1.2.1) --> Tools --> Manage Scheduled Workbooks --> search by user, I can only delete one scheduled workbook at a time. Is there a way to delete these via a script of some kind?
    If any one has a sample script and if you can share here that'd be awesome.
    Thanks in advance,
    -Esther

    Ran into Note:459747.1 from metalink. It has information to identify the scheduled workbook results etc., But according to the note in this note "Note: The tables mentioned here should never be updated or deleted manually."
    But the admin tool allows to delete one scheduled workbook result at a time based on the status.
    Any information here would be beneficial...
    Thanks

  • Discoverer: schedule workbooks error ora-942

    If I schedule the workbook i receive erorr ora-942 table or view doesn't exists. Information is not written into table type EUL... I tried to schedule as owner of EUL
    Could anyone help me.

    Hi,
    From the administrator guide (read the lovely manual?? ;-):
    Before an end user can schedule a workbook, you must:
    configure the database to enable the scheduled workbooks feature by:
    confirming that the DBMS_JOB package is already installed on the database and installing the package if it is not already installed (for more information, see "How to confirm that the DBMS_JOB package is installed")
    specifying the database user that will own the tables containing the results of scheduled workbooks (for more information, see "How to specify the owner of the tables containing scheduled workbooks results")
    setting the frequency of scheduled workbook processing (for more information, see "How to control the frequency that the server checks for new scheduled jobs")
    grant the Schedule Workbooks privilege to the database user (for more information, see Chapter 7, "How to specify the tasks a user or role (responsibility) can perform")
    Regards,
    Sabine

  • Automatically send by email the result of a scheduled workbook Discoverer

    Hi
    is their any way to send emails automatically from discoverer 4i, the results of the scheduled workbooks!
    if not in 4i whether it can be done in 9i?
    -Seetha

    Hello,
    I have the same requirement .. I need to email dicoverer report to about 40 - 50 clients. I need to pass the clients name as paramter to the workbook and send the report output to the corresponding client.
    Can some body please tell me how this can be done using batch file. Is it possible to pass parameters to workbooks and run the disc report from the batch file.
    Thanks in advance.

  • Emailing the results of scheduled workbooks

    Hi everyone
    One of the most common asked for features is the ability to email the results of scheduled workbooks. While this may well become a feature of a future release, I have been able to work out a way to do this using a product called Febooti
    In the coming weeks I will be publishing a white paper on this as well as scripts but for now feel free to take a look at my blog:
    http://learndiscoverer.blogspot.com/2006/08/third-party-scheduling-and-emailing-1.html
    or website: http://learndiscoverer.com/scheduling.htm
    Best wishes
    Michael Armstrong-Smith

    Will appreciate reading the white paper. As I mentioned in another thread, Febooti works great for this and ... well when I last used it ... it was a 'freebie ... well shareware'.
    Russ

  • Scheduled Workbooks--Share Results to Other Users

    Hi there
    I have couple of Scheduled Workbooks. I need to share the result of this workbooks to others users.
    For Desktop I am using 10.1.2.45.46c, I don't have any option to share the data.
    Do I need any patch or other version so I can share the workbook using Desktop
    For Discoverer Plus--OracleBI Discoverer 10g (10.1.2.2)
    I was able to share the Scheduled workbook but when I login to other user I can not see the workbook.
    Any help Appreciated.
    Thanks
    ASIM

    Hi Asim,
    I don't think you can share the results of the scheduled workbook using Desktop. As for Plus, when you're signed on as the other user are you in the same database & eul and are you looking for "scheduled workbooks"?
    Brent

  • Scheduled workbooks can be open via DisPlus/Viewer but not in Desktop

    When we schedule reports in Discoverer results can be pulled out only via Discoverer Plus/Viewer, when sthe ame scheduled report is opened via Discoverer desktop we get the following massage:
    “The results run for this scheduled workbook can no longer be used because the query has changed. Do you want to query the database now for the new results?”
    Does anyone know what the issue is here and how it can be resolved?
    OracleBI Discoverer 10g (10.1.2.2)
    Oracle Business Intelligence Discoverer Plus 10g (10.1.2.54.25)
    Desktop Client 10.1.2.50.05
    Discoverer Model - 10.1.2.54.25
    Discoverer Server - 10.1.2.54.25
    End User Layer - 5.1.1.0.0.0
    End User Layer Library - 10.1.2.54.25
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi

    Hi
    When you upgraded your Discoverer to 10.1.2.2 did you also apply the patch to upgrade Desktop and Administration?
    You would have needed to get hold of the Windows version of the patch then run the software update pointing at the Desktop version.
    Also, I've heard of this happening following an upgrade from version 4 to version 10 and there are various notes on My Oracle Support concerning this. The one I was just looking at is note 419794.1
    Another area where this can happen is if the worksheet uses code that would generate a fan trap. Note 389906.1 deals with this.
    Best wishes
    Michael

  • Discoverer Viewer and Scheduled workbooks error

    Hi
    Hope someone can help.
    I am scheduling workbooks in Discoverer Plus 10.1.2.48 with the intention of viewing them in viewer.
    The report shows itself as running okay in Admin, but when I open the report in Viewer or Plus I get errors including:
    ORA-03106 Fatal two task communication error
    or
    "unable to generate sql for this scheduled workbook"
    I suspect they might be retrieving fairly large result sets (10 K rows +)
    Please can anyone offer advice on how to resolve this?
    Many thanks

    Hi Tim
    Well just the way the file is put together, like is it using SID= or SERVER=, does it use SERVER=DEDICATED, do you have one ADDRESS= or multiple?
    To make sure everything is right, rename both TNSNAMES and SQLNET.ORA files, then suse Net Configuration Assistant to set up a connection. Then compare that with what you have already and make the necessary changes.
    I also noticed that Russ has made a posting concerning a similar error. You should take a look. Its either in here on the Discoverer forum.
    Best wishes
    Michael

  • Can I share a scheduled workbook?

    We have set up scheduled workbooks as the EUL owner, but cannot figure out how the user can access these scheduled reports using their own db id. The user has access to the original report, but does not have the rights to schedule it themselves. Version 10.1.2.1

    Hi
    If you are using the 10.1.2 Plus version of Discoverer, whether original or patched to 10.1.2.2 or 10.1.2.3 then you can do this.
    You simply use Tools | Manage Schedules, pick the existing scheduled workbook and then click the Share button. You can choose which user(s) should have access to the report results.
    Best wishes
    Michael

  • Script to delete expired or errored scheduled workbooks for Discoverer

    Hi All,
    Can any one pont me to find a script to delete all expired and Errored workbooks in Database for discoverer?
    Appreciate all your assistance.
    Thankks
    -S

    Hi Asim,
    I don't think you can share the results of the scheduled workbook using Desktop. As for Plus, when you're signed on as the other user are you in the same database & eul and are you looking for "scheduled workbooks"?
    Brent

  • Problem accessing scheduled report results

    Hi,
    I was able to schedule a Disco report successfully. From Disco desktop scheduling manager, I was monitoring the results. After the status says "Report ready", I clicked the "Open" button.
    For the first dialog message "Do you want to open the results of this sheet? If you click No the sheet will be empty.", I clicked Yes button.
    Then I get the second dialog message "The results run for this scheduled workbook can no longer be used because the query has changed. Do you want to query the database now for the new results?". What does this message mean? Nothing has changed in the report or database or EUL since I scheduled this report. I have been getting this message for all my scheduled reports and it defeats the purpose of scheduling.
    Does anybody know what this message means and how can I resolve this?
    Thanks in advance.

    Hi,
    I am only guessing here but is it possible that the update date on your workbooks has got set in the future. Hence, when the schedule report finishes it checks the update date of the workbook and thinks that the workbook has been updated because it was updated after the schedule report has finished. It then prompts you to re-query for the results.
    If you create a new workbook and schedule it do you get the same problem?
    Rod West

  • Scheduling workbooks in discoverer desktop

    I'm trying to figure out how to schedule workbooks to run and export the output to a folder in Discoverer Desktop, I see in many posts that it can be done easily, I just can't figure it out, can anyone help?
    I did confirm with my DBA that we do have the DBMS_Job package installed.
    When I click on schedule as a user I get the following message:
    A workbook cannot be scheduled for the following reason(s) - summary refresh 'job_queue_processes' parameter is 0
    I would appreciate any help you can offer.
    Thanks,
    Janet
    email: [email protected]

    Hi Janet
    You do not need to have DBA privilegs to schedule workbooks and any user should be able to do this. Here is an article from my notes:
    Setting up Workbook Scheduling
    The workbook scheduling feature in Discoverer uses native features in the Oracle DBMS, and is therefore only available when running against the Oracle database. This feature uses the same highly scalable and reliable processing procedures ithin the kernel, since the summary management capability and the setup for both features is similar. These procedures use standard packages in the DBMS called DBMS_JOB.
    To enable the processing procedures for workbook scheduling in Discoverer, follow these steps:
    A. Grant Schedule Workbook Privilege to the user.
    B. Confirm that DBMS_JOBS has been installed.
    C. Specify result set storage.
    D. Set the time period at which the process kicks in.
    These procedures are described in the following sections:
    A. Grant Schedule Workbook Privilege to the User
    The user must be granted the Schedule Workbooks privilege in the Privileges dialog. Connect to the Administration Edition, and grant the Schedule Workbooks privilege in Tools->Privileges dialog.
    B. Confirming that DBMS_JOBS is Installed
    1. Log onto SQL*Plus as the Administrator, and execute the following SQL statement:
    SQL> select * from all_objects where object_name='DBMS_JOB' and
    object_type = 'PACKAGE';
    If the statement returns no rows, use SVRMGRL to create the necessary packages.
    2. From Windows XP or NT, select Start->Run.
    3. Type in one of the following:
    SVRMGRL
    4. When in the DBA facility, type CONNECT INTERNAL.
    5. Execute the following SQL statement:
    SQL> start <ORACLE_HOME>/rdbms/admin/dbmsjob.sql;
    SQL> start <ORACLE_HOME>/rdbms/admin/prvtjob.plb;
    C. Specifying Result Set Storage
    When a scheduled workbook is run, the results are stored in database tables
    within the database. Result set data created as part of the workbook
    scheduling process may be stored in one of two areas:
    the user's own schema or a centralized schema.
    User's Schema
    In order to enable workbook scheduling in the user's own database schema,
    the user requires the following database privileges:
    Create Procedure
    Create Table
    Create View
    To grant these privileges, do the following:
    1. Log onto SQL*Plus or SQLDBA as the Database Administrator.
    2. Type the following:
    SQL> Grant CREATE PROCEDURE to <USER>;
    SQL> Grant CREATE TABLE to <USER>;
    SQL> Grant CREATE VIEW to <USER>;
    SQL> Grant EXECUTE ANY PROCEDURE to <USER>;
    SQL> Grant SELECT on SYS.DBMS_JOB to <USER>;
    SQL> Grant EXECUTE on SYS.V$_PARAMETER to <USER>;
    where <USER> is the userid of the person who is to be allowed to schedule
    workbooks.
    These privileges must be granted directly to the user and not to a database
    role.
    Advantages: A database limit can be specified on the maximum amount of data a
    user can store in the database. If the result set is stored under the user's
    schema, then you keep control over the maximum amount of space one individual
    user can fill with result sets. If the user creates a scheduled workbook that
    fills that space, it affects only his/her own scheduled workbook.
    Disadvantage: The user is required to have the above privileges in the database.
    Repository User's Schema
    In order to enable workbook scheduling using a centralized repository user's
    schema, the SQL script batchusr.sql must be run in SQL*Plus or SQLDBA as a
    database administrator (such as, SYSTEM). This script creates a new user that
    is granted the above privileges.
    In addition, the administrator of the EUL must change the user so that the
    Repository User property is pointing to the repository user's schema just
    created. The centralized repository user's schema may be customized by the
    database administrator for space management purposes and underlying data access.
    NOTE: SELECT ANY TABLE access is given by the script batchusr.sql,
    but this may be limited provided the repository user's schema is
    granted access to the underlying data that will be accessed for
    workbook scheduling.
    The repository user created will not be able to directly schedule a workbook
    through the User Edition.
    Advantages: Each user does not need DML procedures to run scheduled workbooks.
    Disadvantages: One user can potentially run a scheduled workbook that fills the
    available result set space, preventing other scheduled workbooks from running
    until it is cleared.
    D. Setting the Start Time for Workbook Processing
    The workbook processes run within the database on the server, and are
    controlled by parameters in the initialization file of the Oracle DBMS
    - the INIT<SID>.ORA file.
    To limit the number of processing requests that can run simultaneously:
    The parameter job_queue_processes specifies the number of concurrent processes to use to process DBMS_JOB. It controls the number of processing requests that can be handled simultaneously. The default value is zero, which means processing requests will not be created. You should set it to a minimum of 2 or more if you have any other applications that use DBMS_JOB.
    You need more than one job queue process, because if one job fails for any reason, it may keep getting re-submitted, and thus, prevent everything else in the queue from being completed. If you want to have 10 simultaneous processing requests handled, then you will need to set this to 10.
    The INIT<SID>.ORA parameter job_queue_interval is the time in seconds that controls how often the job processes wake up to process pending jobs. The default is 60, which is quite frequent. What you set this to depends on how frequently you want the process to wake up and serve the requests that have been made. Oracle recommends that you update the 60 seconds default to at least 10 minutes (a value of 600).
    NOTE: This parameter also affects summary management.
    To enable these parameters:
    1. Locate the INIT<SID>.ORA file.
    For example, on Personal Oracle7 the INIT<SID>.ORA file is held in
    <ORACLE_HOME>\database. Its default name is INITORCL.ORA where ORCL is
    the <SID> name.
    2. Enter 2 lines into the file. For example:
    job_queue_processes = 2
    job_queue_interval = 600 (equivalent to 10 minutes)
    NOTE: The summary management and workbook scheduling features both use this scheduling capability within the Oracle DBMS. The interval you specify and the number of concurrent requests affect both features.

  • Scheduled Reports results by Command Line

    I have several reports that I schedule to run nightly in Discoverer 10G Desktop. How can I open the scheduled results using Command Line? Once open, I want to export the results as Excel. I can do a unscheduled report using the code below:
    \oracle\BIToolsHome_1\bin\dis51usr.exe /connect username/password@report /apps_user /apps_responsibility "responsiblity name" /opendb "report name" /sheet "Exception Report" /parameter "parameter name" 'parameter value' /export XLS C:\TEMP\testexport1.xls
    Is it possible to retrieve the scheduled results? How much of this could be done at command line and how much would have to be done in a third party scheduler?
    Thanks.
    Edited by: user12248590 on Feb 18, 2010 12:46 PM

    Hi,
    How can I open the scheduled results using Command Line? Is it possible to retrieve the scheduled results?No, I don't think it is possible to retrieve scheduled results from the command line.
    How much of this could be done at command line and how much would have to be done in a third party scheduler? It would be better to do it all using a third party scheduler such as the windows task manager. You could schedule the export to run overnight using the task manager and a windows command file. You can search this forum or the LearnDiscoverer blog for more details on third party scheduling.
    Rod West

  • Export query results to excel from forms

    Are there any ways to export query results to MS Excel format files from a form.
    Thanks.

    Here's my working code out of one of my forms that does this:
    PROCEDURE export_transactions_to_excel 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;
    -- my variables
    rowCounter Number := 1;
    local_cursor_Record number := :System.Cursor_Record;
    old_cursor_Style varchar2(100);
    errors_occurred boolean := false;
    Ole_Error Exception;
    pragma exception_init( Ole_Error, -305500 );
    my_alert_id ALERT;
    alert_response NUMBER;
    procedure place_value_in_cell( rownum_in in number
    , colnum_in in number
    , value_in in varchar2 )
    is
    -- Declare handles to OLE argument lists
    args ole2.list_Type;
    begin
    args := ole2.create_arglist;
    ole2.add_arg(args, rownum_in); /* row number */
    ole2.add_arg(args, colnum_in); /* column number */
    -- the next line is for excel97
    -- cell := ole2.invoke_obj( worksheet, 'Cells', args );
    cell := ole2.get_obj_property( worksheet, 'Cells', args );
    ole2.Destroy_arglist( args );
    ole2.set_property( cell, 'Value', value_in );
    ole2.release_obj (cell);
    end place_value_in_cell;
    procedure SaveSpreadsheet
    is
    args ole2.List_Type;
    vDateStamp varchar2(20);
    begin
    vDateStamp := to_char(sysdate,'mmddyyyy') &#0124; &#0124; '_' &#0124; &#0124; to_char(sysdate,'hh24miss');
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'C:\PAPRETCC_' &#0124; &#0124; vDateStamp &#0124; &#0124; '.XLS');
    OLE2.INVOKE(worksheet, 'SaveAs', args);
    OLE2.DESTROY_ARGLIST(args);
    --args := Ole2.Create_ARgList;
    ole2.invoke( application, 'Quit' );
    end SaveSpreadSheet;
    procedure Open_EXCEL_Workbook is
    Begin
    application := ole2.create_obj('Excel.Application');
    --ole2.set_property( application, 'Visible', 'True' );
    -- Return object handle to the Workbooks collection
    workbooks := ole2.get_obj_property( application, 'Workbooks' ); -- invoke_obj w/ excel 97
    -- Add a new Workbook object to the Workbooks collection
    workbook := ole2.invoke_obj( workbooks, 'Add' );
    -- return object handle to the Worksheets collection for the
    -- Workbook
    worksheets := ole2.get_obj_property( workbook, 'Worksheets' ); -- invoke_obj w/ Excel97
    -- Add a new Worksheet to the Worksheets collection
    worksheet := ole2.invoke_obj( worksheets, 'Add');
    end open_EXCEL_workbook;
    PROCEDURE Write_Column_Headers IS
    BEGIN
    place_value_in_cell(rowCounter,1, 'Payer Name');
    place_Value_in_cell(rowCounter,2, 'Payer Address');
    place_value_in_cell(rowCounter,3, 'SSN');
    place_value_in_cell(rowCounter,4, 'Account');
    place_value_in_cell(rowCounter,5, 'Refund Receipt');
    place_value_in_cell(rowCounter,6, 'Pretax Allocation');
    place_value_in_cell(rowCounter,7, 'Tax Allocation');
    place_value_in_cell(rowCounter,8, 'Total Amount');
    place_value_in_cell(rowCounter,9, 'Orig Receipt');
    place_value_in_cell(rowCounter,10,'Orig Date');
    place_value_in_cell(rowCounter,11,'TR Number');
    place_value_in_Cell(rowCounter,12,'Date');
    place_Value_in_cell(rowCounter,13,'Status');
    place_value_in_cell(rowCounter,14,'Vt Number');
    rowCounter := rowCounter + 1;
    END Write_Column_Headers;
    PROCEDURE Export_The_Data IS
    original_receipt number;
    original_date DATE;
    original_transmittal_number number;
    BEGIN
    -- Return object handle to cell A1 on the Worksheet
    Go_block('Transactions');
    First_Record;
    LOOP
    IF alert_response = ALERT_BUTTON2 or
    (alert_response = ALERT_BUTTON1 and nvl(:transactions.rg_approval,'N') <> 'N' )
    -- :system.record_status = 'CHANGED')
    then
    place_value_in_cell( rowCounter, 1, :TRANSACTIONS.NDB_PAYEE_NAME );
    place_value_in_cell( rowCounter, 2, nvl(:TRANSACTIONS.NDB_PAYEE_ADDRESS,'unknown') );
    place_value_in_cell( rowCounter, 3, nvl(:TRANSACTIONS.NDB_SSN,'unknown') );
    place_value_in_cell( rowCounter, 4, :transactions.NDB_DESCRIPTION );
    place_value_in_cell( rowCounter, 5, to_char(:Transactions.transaction_group_EID) );
    place_Value_in_cell( rowCounter, 6, to_char(:transactions.ndb_pretax_amount) ); -- chg
    place_ value_in_Cell( rowCounter, 7, to_char(:transactions.ndb_tax_amount) );
    place_value_in_cell( rowCounter, 8, to_char(:transactions.amount_including_taxes) );
    original_receipt := revenue_pkg.original_receipt_number(
    :transactions.transaction_group_eid,
    :transactions.allocation_eid,
    :transactions.allocation_table );
    original_date := revenue_pkg.original_receipt_date(
    :transactions.transaction_group_eid,
    :transactions.allocation_eid,
    :transactions.allocation_table );
    original_transmittal_number := revenue_pkg.transmittal_number_for_receipt(original_receipt);
    place_value_in_cell( rowCounter, 9, nvl(to_char(original_receipt),'unknown') );
    place_value_in_cell( rowCounter, 10, nvl(to_char(original_date,'mm/dd/yyyy hh24:mi:ss'),'unknown') );
    place_value_in_cell( rowCounter, 11, nvl(to_char(original_transmittal_number),'unknown') );
    -- COMPTROLLER COLUMNS
    IF ( alert_response = ALERT_BUTTON1 and nvl(:transactions.rg_approval,'N') <> 'N' )
    THEN
    place_value_in_cell( rowCounter, 12, to_Char(sysdate,'mm/dd/yyyy') );
    place_value_in_cell( rowCounter, 13, nvl(:transactions.rg_approval,'N') );
    place_value_in_cell( rowCounter, 14, nvl(to_char(:location.vt_number),'NULL') );
    END IF;
    End If;
    exit when :SYSTEM.LAST_RECORD = 'TRUE';
    NEXT_RECORD;
    rowCounter := rowCounter + 1;
    END LOOP;
    END Export_The_Data;
    /* ----------------------------------- main procedure --------------------------------------*/
    BEGIN
    Begin
    my_alert_id := Find_Alert('THREE_BUTTON_ALERT');
    IF NOT ID_NULL( my_alert_id ) then
    alert_Response := SHOW_ALERT( my_alert_id );
    If (alert_response = ALERT_BUTTON1) OR
    (alert_response = ALERT_BUTTON2) then
    old_Cursor_style := get_application_property( CURSOR_STYLE );
    set_application_property( CURSOR_STYLE, 'BUSY' );
    Open_EXCEL_WorkBook;
    Write_Column_Headers;
    Export_The_Data;
    Else
    Raise Form_Trigger_Failure;
    End If;
    Else
    Raise Form_Trigger_Failure;
    End If;
    exception
    when Form_Trigger_Failure then
    RAISE;
    when Ole_Error then
    AlertSend( 'There was an error exporting the data to Microsoft Excel (receipt# ' &#0124; &#0124;
    to_Char(:transactions.transaction_Group_eid) &#0124; &#0124; ')', false );
    errors_occurred := TRUE;
    when others then
    AlertSend( SQLERRM, false );
    errors_occurred := TRUE;
    End;
    Ideally, I'd like to call SaveSpreadsheet in Export_The_Data, and just ExitExcel here,
    but it prompts for whether to save the changes and I don't know how to get around that
    right now. SO, we just save and exit, regardless.
    SaveSpreadSheet;
    -- Release the OLE objects
    ole2.release_obj (worksheet);
    ole2.release_obj (worksheets);
    ole2.release_obj (workbook);
    ole2.release_obj (workbooks);
    ole2.release_obj (application);
    IF NOT errors_occurred then -- stay on the record that caused the error
    Go_Record( local_cursor_Record );
    End If;
    Set_Application_Property ( CURSOR_STYLE, old_cursor_style );
    EXCEPTION
    When Form_Trigger_Failure then
    null;
    When Others then
    AlertSend( SQLERRM );
    END export_transactions_to_excel;

Maybe you are looking for