in reply to Re: How can make a consult from M$ Excel to a perl program?
in thread How can make a consult from M$ Excel to a perl program?

What???? I am sorry, but you do not have to create custom ActiveX components to access Excel/Access/Word from Perl. These already exist for you and they work very well.

May I introduce you to the Win32 libraries which contain the OLE object? The code to access Excel looks something like so:

use Win32::OLE; $class = "Excel.Application"; $File = qq(c:\\temp\\Mytext.xls); $Excel = Win32::OLE->GetActiveObject($Class); $Excel->(Visible);

Now, the underlying mechanics of Win32 actually involve DLLs that are performing the low level calls to Windows resources, but why reinvent the wheel? Roth even offers you source code at his site. His book shows you how to extend Perl for Win32 as well.

For more information, look up Win32 at CPAN or buy Windows NT Win32 Perl Programming by Dave Roth.

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
Re: Re: Re: How can make a consult from M$ Excel to a perl program?
by eLore (Hermit) on Mar 20, 2001 at 22:01 UTC
    Reduce, reuse, recycle... Go perl!

    You may also wish to consider obtaining modules for ActiveState via PPM, as well as CPAN.

Re: Re: Re: How can make a consult from M$ Excel to a perl program?
by c-era (Curate) on Mar 21, 2001 at 00:24 UTC
    That isn't what I said. I said you needed to create a custom activex compnent to access your perl program from Excel (which is what he asked for). What you show above is part of what is needed for my third sugestion.

    P.S. In my opinion, OLE is better then Win32::OLE (as in OLE hasn't crashed and Win32::OLE has).