I have written a large number of scripts using OLE and
Excel, but I'm getting something strange now.
Here are the relevant portions of the script:
$Excel = Win32::OLE-
GetActiveObject('Excel.Application') or Win32::OLE-
new('Excel.Application', 'Quit'); # This is one line
');
croak(error accessing Excel OLE server: , Win32::OLE-LastError)
unless defined $Excel;
HTH,
Ian
-Original Message-
From: Jeffrey [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 11, 2002 2:49 PM
To: Perl win32
Subject: OLE errors
I have written a large number of scripts using
Doh! I knew it would be something easy. I had typed
'or' so it was more readable. Something clicked in my
head about precedence, but I ignored it.
Many thanks!
p.s. My script is running with strict and -w, it's
just that $Excel is in a 'my' statement before the
line I posted.
--- [EMAIL
On Fri, 11 Jan 2002, Jeffrey wrote:
I have written a large number of scripts using OLE and
Excel, but I'm getting something strange now.
Here are the relevant portions of the script:
$Excel = Win32::OLE-
GetActiveObject('Excel.Application') or Win32::OLE-
new('Excel.Application', 'Quit');