Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: is this file open?

by mbethke (Hermit)
on Dec 18, 2011 at 05:25 UTC ( #944159=note: print w/ replies, xml ) Need Help??


in reply to is this file open?

What GrandFather said. Or you could even try and write an Excel file directly using Excel::Writer::XLSX.

The error message most likely comes from Excel itself when it tries to open the file and finds it locked by the existing Excel process. If pasting from Notepad is all you want to do in Excel at this point, writing the file using the above module will get rid of this problem. Otherwise you could try and add a timestamp to the file name so subsequently launched Excel processes won't try to step on each other's files. There is probably a way to find an already running Excel process (I'd guess Win32::Process::Info) and remote-control it using COM or something to reload the file, but I don't really have a clue how to do that, I'd just search the Win32:: module namespace for something that sounds like it would.


Comment on Re: is this file open?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2014-12-28 21:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls