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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dr3586
    New Member
    • Aug 2007
    • 3

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

    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
  • singhnitin
    New Member
    • Nov 2007
    • 1

    #2
    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; Nov 2 '07, 08:49 AM. Reason: Removed mail id.

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      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.

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        You can't set macros form PL / SQL.

        Comment

        • jdhtoo
          New Member
          • Nov 2007
          • 1

          #5
          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.

          Comment

          • amitpatel66
            Recognized Expert Top Contributor
            • Mar 2007
            • 2358

            #6
            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.

            Comment

            • praise
              New Member
              • Nov 2007
              • 1

              #7
              hi...
              i would like to know about the procedure that u used to extract data into excel.
              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

              Comment

              • SOMIYA
                New Member
                • Jun 2009
                • 1

                #8
                Can some please put up the Stored proc to load data from a table into excel file?

                Comment

                • asp2
                  New Member
                  • Dec 2008
                  • 10

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

                  args:=client_ol e2.CREATE_ARGLI ST;
                  client_ole2.ADD _ARG( args, V_MACRO_NAME );
                  client_ole2.INV OKE( Application, 'RUN' ,ARGS );
                  client_ole2.des troy_arglist(ar gs);

                  Comment

                  Working...