in reply to Win32::OLE - is it the best option?

Win,

A good node to read would be Using Win32::OLE and Excel - Tips and Tricks, which tells you how to run VBA macros within Excel via Win32::OLE, among many other things. Have you Super Searched this topic?

Also Activestate.com have an article which explains How to convert a VBA macro to Perl, perhaps worth a look.

Hope this helps.

Martin
  • Comment on Re: Win32::OLE - is it the best option?

Replies are listed 'Best First'.
Re^2: Win32::OLE - is it the best option?
by Win (Novice) on Jan 20, 2006 at 14:55 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.