Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Newbie
 
Join Date: Aug 2007
Posts: 3
#1: Aug 9 '07
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

Newbie
 
Join Date: Nov 2007
Posts: 1
#2: Nov 2 '07

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
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#3: Nov 2 '07

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.
debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,511
#4: Nov 2 '07

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


You can't set macros form PL / SQL.
Newbie
 
Join Date: Nov 2007
Posts: 1
#5: Nov 5 '07

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.
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#6: Nov 6 '07

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.
Newbie
 
Join Date: Nov 2007
Posts: 1
#7: Nov 13 '07

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

Newbie
 
Join Date: Jun 2009
Posts: 1
#8: Jun 16 '09

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?
Newbie
 
Join Date: Dec 2008
Posts: 9
#9: Jul 14 '09

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);
Newbie
 
Join Date: Oct 2009
Posts: 1
#10: Oct 1 '09

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