Wednesday, September 18, 2013

Merging Discoverer workbooks or Moving/Copying Worksheet from one workbook to another

May be I am missing something (suggestions are most welcome) but to achieve these I am going with the new workbook approach.

Steps:

1> Login to Discoverer Desktop

2> Open all the workbooks you want to merge

3> Now click the 'Restore Down' button (with Double square symbol ) of the last opened workbook.
   > You can see all the opened workbooks in the same window.

4> select the 1st worksheet of the 1st workbook and drop into the vacant space of the window with 'Control' button pressed.
   Note: Without 'Ctrl' it will completely move the sheet from workbook, with 'Ctrl' it will just copy the sheet from the workbook
   > So 'Ctrl' button pressed and left click on the worksheet and drag to the vacant area.
   >> It will create a new workbook with that worksheet, do the same drag and drop for other worksheets from all the workbooks to the new workbook.
     >> Save the new workbook with the name as required.
     >> At the end, share this workbook to the respective users.

Related Post: Renaming Discoverer Workbooks

Renaming Discoverer Workbook

You cannot rename the existing workbook, what you can do is, save the workbook with new name and delete the existing one.(OR you can go with the Oracle non supported approach and update the base table eul5_documents)

Issue with this approach is, you need to re-share this workbook again with all the original users .

Steps:

1> Run the below script and note down the user name with which workbook has been shared

select fu1.user_name||'||'||fu1.description "Workbook Owner",
       doc_name "Workbook Name",doc_description "Description",
       fu2.user_name||'||'||fu2.description "Shared With"
  from eul_us.eul5_eul_users usrs,
       eul_us.eul5_documents docs,
       eul_us.eul5_access_privs privs,
       fnd_user fu1,
       fnd_user fu2
 where privs.gd_doc_id = docs.doc_id
   and usrs.eu_id = privs.ap_eu_id
   and '#'||fu1.user_id = ap_created_by
   and '#'||fu2.user_id = eu_username
   --and fu2.user_name = 'KABHAY'
   --and doc_name like 'Project Transaction%'
   ;

2> Login to Discoverer Desktop, take the backup of the workbook on database/local machine

3> Save as this workbook with the <New Name>
   >> File > Save As...

4> Delete the original workbook (This step will remove all the sharing)
   >> File > Manage Workbooks > Delete...

5> Share the renamed workbook with the users again (user list from 1st step)
   >> File > Manage Workbooks > Sharing...