Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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.


Comment on Re^5: Win32::OLE called by subroutine only workes once
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006274]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-07-31 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls