Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by Bloodnok (Vicar)
on Aug 11, 2009 at 12:09 UTC ( #787591=note: print w/ replies, xml ) Need Help??


in reply to Win32::OLE called by subroutine only workes once

I don't know, but would guess that M$ have implemented the close call to return immediately after the close has been issued downward i.e. not waiting for completion of the closure.

Try putting a sleep between the calls ... a near equivalent of running the code in the debugger when the delay would be mandraulic ;-|

Just a thought...

A user level that continues to overstate my experience :-))


Comment on Re: Win32::OLE called by subroutine only workes once
Replies are listed 'Best First'.
Re^2: Win32::OLE called by subroutine only workes once
by fish (Novice) on Aug 11, 2009 at 13:21 UTC
    Thanks for your ideas.
    $book->Close(1); instead of $book->Close(); seems to work - but please do not ask me why :D

    Regards, fish
      Ok, obviously it was just fortune that it worked with close(1).

      Today I want to use the script again and it fails saying: Win32::OLE(0.1709) error 0x80010108: "Das aufgerufene Objekt wurde von den Clients getrennt"

      Does anybody has an idea how I can solve this problem?
        Hi, Even I'm facing same issue The error says "Win32::OLE(0.1709) error 0x80010108: "The object invoked has disconnected from its clients"" I'm calling the function twice which is having excel opening and closing commands. Please help how can I solve this issue?
        Hello, did you solve this problem? I have the same problem at the moment. My script runs some weeks very fine. But since three days I have this problem. First I get this error only if I try to open the second excel file, now I get it at the first call, too. Thanks in advanced. Tim

        Hello,

        did you solve this problem? I have the same problem at the moment. My script runs some weeks very fine. But since three days I have this problem. First I get this error only if I try to open the second excel file, now I get it at the first call, too.

        Thanks in advanced.
        Tim

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-07-29 01:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls