This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Accessing perl from VB...



John.Velman wrote:
>Last spring I desparately needed to use Perl's regular expression
>capabilities in a VBA program that was doing transformations on
>a huge Excel file.   I found that the Active State perl has a perl dll
>(and directions for using it), so I installed the Active State perl.

I know of a few different ways to go at this, although this is a little
off topic for a Cygwin group.

+ ActiveState Perl (calling from VBA to Perl)
  + PerlEZ.dll: a simple DLL that can be loaded by VBA and
    creates a perl interpreter from which you can do most
    perl things (kinda buggy IMHO).
  + PerlCOM: exposes Perl as a COM object, from VBA you
    can do CreateObject, etc.
  + Microsoft ActiveX Scripting Control: a COM object that
    provides hooks into Microsoft's scripting engine which
    in turn can call into PerlScript as well as other languages.

+ Win32::OLE (calling from Perl to ActiveX)
  Allow calls from Perl into any ActiveX (aka COM, OLE) object like
  Excel.  Also, works well in combination with the above.

  The latest Win32-OLE-0.13 compiles relatively cleanly on Cygwin.
  Attached is a patch that works around a know gcc bug.  The
  Win32::OLE maintainer is aware of the problem, but since it is
  a gcc bug ...

How did you solve your problem?

>I'd just as soon de-install the Active State perl.  Question:  how hard
>would it be to get at the perl functions from VBA using  libperl5_6_0.dll?

I have some patches to Win32::OLE that basically takes the PerlEZ approach
of creating a DLL that can be loaded by VBA (only tested with Excel) and
has an embedded Perl interpreter.

After corresponding with Jan Dubois, the Win32::OLE maintainer, I've been
planning to clean it up and upload to CPAN.  If your interested, I can
try to do this sooner rather than later.

Regards,

Eric Fifer





Win32-OLE.patch

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]