Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Win32::OLE - is it the best option?

by Win (Novice)
on Jan 20, 2006 at 13:19 UTC ( [id://524461]=perlquestion: print w/replies, xml ) Need Help??

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

Dear Monks,

Does anyone please have an example of a Perl program that will set an Excel application to run in the background and then activate a VBA script within that Excel application? A few good monks have informed me that it is best to use Win32::OLE, although I am open to other suggestions. For example, I was wondering whether a system call could be used.

Replies are listed 'Best First'.
Re: Win32::OLE - is it the best option?
by marto (Cardinal) on Jan 20, 2006 at 13:26 UTC
      This is a great link thanks. The code in the link is giving me a spot of difficulty when it comes to:
      $Excel->ActiveSheet->Pictures->Insert(<http://perlmonks.org/images/use +rmonkpics/httptech.gif>); #And now for a brief example using a Variant data type and it's method +s. Update: Added other variant as per example in this node my $dt = Variant(VT_DATE, $Sheet->Range("a1")->{Value}); ## This is t +he line that give me the ERROR
      where I get the error message:
      Win32::OLE(0.1701) error 0x80020005: "Type mismatch" at Perl_program.p +l line 87
        Win,

        You have been a user here for quite some time and should know by now that providing sample data your working with, in addition to the code thats causing problems helps to point out what the cause of the problem and any possible solutions.

        What is the value of:
        $Sheet->Range("a1")->{Value}

        Martin
        A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://524461]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-18 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found