Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^5: Win32::OLE called by subroutine only workes once

by nll (Initiate)
on Nov 29, 2012 at 15:27 UTC ( #1006274=note: print w/replies, xml ) Need Help??

in reply to Re^4: Win32::OLE called by subroutine only workes once
in thread Win32::OLE called by subroutine only workes once

I've found Excel OLE to be quirky like this. My pseudo subclass suddenly stopped working due to this error, I found it was because the order of operations had changed. I made sure the following global operations happened before any book level or worksheet level op. happened.
my $ex = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); if (not defined $ex) { die "couldn't get an instance of Excel"; } $ex->{DisplayAlerts}=0; $ex->{SheetsInNewWorkbook} = 1; $ex->{Visible} = 0 ; $Win32::OLE::Warn = 3; # Die on Errors.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006274]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2017-09-25 03:56 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (276 votes). Check out past polls.