Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: is this file open?

by nikosv (Chaplain)
on Jan 06, 2012 at 18:43 UTC ( #946648=note: print w/replies, xml ) Need Help??

in reply to is this file open?

Take a look at the Win32::OLE documentation which can tell you if Excel (OLE automation server) or the object is already open:

Win32::OLE->GetActiveObject(CLASS, DESTRUCTOR) The GetActiveObject() class method returns an OLE reference to a running instance of the specified OLE automation server. It returns undef if the server is not currently active. It will croak if the class is not even registered. The optional DESTRUCTOR method takes either a method name or a code reference. It is executed when the last reference to this object goes away. It is generally considered impolite to stop applications that you did not start yourself.

Win32::OLE->GetObject(MONIKER, DESTRUCTOR) The GetObject() class method returns an OLE reference to the specified object. The object is specified by a pathname optionally followed by additional item subcomponent separated by exclamation marks '!'. The optional DESTRUCTOR argument has the same semantics as the DESTRUCTOR in new() or GetActiveObject().

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946648]
[1nickt]: ... if I involved my wife (or myself) in an altercation over a slogan.
[1nickt]: I will not convince anyone who disagrees with me, with a sticker. And I don;t need to advertise my thoughts, really.
[Discipulus]: ++1nickt but what about: "out immigrants! just redskins!"
[1nickt]: I know what I believe and whether I have integrity. My actions will speak more.
[karlgoethebier]: choroba Nothing unclever in my sig. And remember: Beeing too clever is a bad mistake ;-)
[1nickt]: This is not to suggest that Karl should remove his slogan. Just thoughts of mine... Trust me I believe I am very much more radical than most, and if I had a slogan for every gross injustice in my sig, there would be no more bytes!
Discipulus redskins .. well native american..
[1nickt]: So if I was to offer any editorial advice it would be to (1) make it endure time passing (2) make it positive (3) make it about you and your beliefs
[1nickt]: (Disicpulus The new best choice is maybe "First People"
[karlgoethebier]: Discipulus: This is called "Volksverhetzung" in German which means

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-06-22 12:08 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (519 votes). Check out past polls.