Connecting Tech Pros Worldwide Help | Site Map

Extract data into Excel and enable macros from PL/SQL procedure

  #1  
Old August 9th, 2007, 09:27 PM
Newbie
 
Join Date: Aug 2007
Posts: 3
Hi,

I have an Oracle PL/SQL procedure that extracts data into an excel worksheet. I am wondering if there is anyway from the procedure to also set the macros of the excel document that is created?

For example, usually the macros are manually done:
Go to Tools, Macros – Macro. Select the “Automate” macro and click “run”.

However I am trying to automate the manual process. Any suggestions or direction?

Thanks,
DR
  #2  
Old November 2nd, 2007, 09:14 AM
Newbie
 
Join Date: Nov 2007
Posts: 1

re: Extract data into Excel and enable macros from PL/SQL procedure


Quote:
Originally Posted by dr3586
Hi,

I have an Oracle PL/SQL procedure that extracts data into an excel worksheet. I am wondering if there is anyway from the procedure to also set the macros of the excel document that is created?

For example, usually the macros are manually done:
Go to Tools, Macros – Macro. Select the “Automate” macro and click “run”.

However I am trying to automate the manual process. Any suggestions or direction?

Thanks,
DR
hI
Can you please send me that pl/sql procedure that extracts data into an excel worksheet.
As i am working on a similar case
Email id: [ Removed ]
Thanks alot
Nitin Singh

Last edited by debasisdas; November 2nd, 2007 at 09:49 AM. Reason: Removed mail id.
  #3  
Old November 2nd, 2007, 09:24 AM
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,188

re: Extract data into Excel and enable macros from PL/SQL procedure


Quote:
Originally Posted by dr3586
Hi,

I have an Oracle PL/SQL procedure that extracts data into an excel worksheet. I am wondering if there is anyway from the procedure to also set the macros of the excel document that is created?

For example, usually the macros are manually done:
Go to Tools, Macros – Macro. Select the “Automate” macro and click “run”.

However I am trying to automate the manual process. Any suggestions or direction?

Thanks,
DR
Setting a macro would not be possible from PLSQL.
Could you please tell what is that macro going to do?

One suggestion would be to connect to oracle database from Excel using macro and fetch the data in to excel sheet.
  #4  
Old November 2nd, 2007, 09:51 AM
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,485
Provided Answers: 1

re: Extract data into Excel and enable macros from PL/SQL procedure


You can't set macros form PL / SQL.
  #5  
Old November 5th, 2007, 03:28 PM
Newbie
 
Join Date: Nov 2007
Posts: 1

re: Extract data into Excel and enable macros from PL/SQL procedure


Hi, I have the same request. I am collecting data via PL/SQL procedure and downloading them in excel. I have a macro that runs a chart. I am trying to make the whole report automated. Any other workaround for the macro to run?
Thanks.
  #6  
Old November 6th, 2007, 04:46 AM
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,188

re: Extract data into Excel and enable macros from PL/SQL procedure


Quote:
Originally Posted by jdhtoo
Hi, I have the same request. I am collecting data via PL/SQL procedure and downloading them in excel. I have a macro that runs a chart. I am trying to make the whole report automated. Any other workaround for the macro to run?
Thanks.
I hope you would have got the answer from the above posts that setting a macro using PLSQL is not possible.
You can rather connect to oracle DB from excel using macro and fetch the data and store them in the oracle work book.
  #7  
Old November 13th, 2007, 06:45 AM
Newbie
 
Join Date: Nov 2007
Posts: 1

re: Extract data into Excel and enable macros from PL/SQL procedure


hi...
i would like to know about the procedure that u used to extract data into excel.
Quote:
Originally Posted by dr3586
Hi,

I have an Oracle PL/SQL procedure that extracts data into an excel worksheet. I am wondering if there is anyway from the procedure to also set the macros of the excel document that is created?

For example, usually the macros are manually done:
Go to Tools, Macros – Macro. Select the “Automate” macro and click “run”.

However I am trying to automate the manual process. Any suggestions or direction?

Thanks,
DR
  #8  
Old June 16th, 2009, 12:16 PM
Newbie
 
Join Date: Jun 2009
Posts: 1

re: Extract data into Excel and enable macros from PL/SQL procedure


Can some please put up the Stored proc to load data from a table into excel file?
  #9  
Old July 14th, 2009, 09:58 PM
Newbie
 
Join Date: Dec 2008
Posts: 9

re: Extract data into Excel and enable macros from PL/SQL procedure


you can "run" a macro using client-side client_ole2 code , use:

args:=client_ole2.CREATE_ARGLIST;
client_ole2.ADD_ARG( args, V_MACRO_NAME );
client_ole2.INVOKE( Application, 'RUN' ,ARGS );
client_ole2.destroy_arglist(args);
  #10  
Old October 1st, 2009, 04:58 PM
Newbie
 
Join Date: Oct 2009
Posts: 1

re: Extract data into Excel and enable macros from PL/SQL procedure


Hey,

We are really happy with this tool called Excellant. It allows you in pl/sql to create clobs of excel using xml and sql. It does styles, formulas and multi sheet. Not sure about macros. The website is http://www.peak42solutions.com. We started using them a few weeks ago it rocks.

Bill
Reply