use warnings; use strict; use Win32::OLE qw(EVENTS); my $Excel = Win32::OLE->new('Excel.Application'); $Excel->{Visible} = 1; my $Workbook = $Excel->Workbooks->Add; sub Event { my ($Obj,$Event,@Args) = @_; print "Event triggered: '$Event'\n"; } Win32::OLE->WithEvents($Excel, \&Event, 'AppEvents'); while (1) { sleep(1); Win32::OLE->SpinMessageLoop; }
--
May the Source be with you.You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
In reply to Re2: Excel and OLE
by Solo
in thread Excel and OLE
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |