Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2018-05-21 03:31 GMT
Find Nodes?
    Voting Booth?