suzun30 has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am trying to automate some excel operations using Win32::ole. Is there any proper documentation for all the win32::ole excel object tree apart from the msdn ones and the ones on Perlmonks itself. I am trying to find something which shows the object tree or in perl the reference of refrence to each object equivalent in vba. I have already got the excel,win32::ole docs which just give some basic examples of read write,etc. I need some more specific information to set some formats,formula,and other excel specific stuff. Appreciate any pointers.

Thanks a lot!

Replies are listed 'Best First'.
Re: Win32::OLE Excel Perl Documentation
by davies (Monsignor) on May 08, 2013 at 21:55 UTC

    There isn't one that I've met. There might even be legal issues (IANAL) about producing one, as it may be MS copyright in some jurisdictions. The generally recommended approach is to understand what you want to do in terms of VBA (recording a macro is often suggested, but that tends to be bad VBA) and then translate it to Perl. If you can give some concrete examples of what it is you are trying to do, I and the other monks may be able to give you pointers to some of the specifics, but automating Excel does mean understanding Excel, and that is generally easier if you attempt to do it on Excel's own terms.

    Regards,

    John Davies

      Thanks for the prompt reply. I am right now going by trial and error on the vba obect tree model and replacing the .s with ->s and so far accomplished what I needed, by googling and surviving with solutions from other peoples issues posted on forums. Would have been easier to have a handbook to refer to. I will post with my issues once they are out of scope. Appreciate the inputs.

      Thanks again!
Re: Win32::OLE Excel Perl Documentation
by Anonymous Monk on May 09, 2013 at 03:27 UTC

    The MSDN reference is the proper authoritative one

    See Win32/OLE related tutorials/examples/resources and use the Win32::OLE object browser, remember that it needs ActivePerl+PerlScript

    Once you read the perl ole tutorials/faqs, you'll know how to go from MSDN (VB) reference to perl syntax

Re: Win32::OLE Excel Perl Documentation
by Gangabass (Vicar) on May 09, 2013 at 01:10 UTC
    I'm using VBA Object Browser for this: run Excel and press Alt+F11 and next press F2