in reply to Re: Finding if a file is open
in thread Finding if a file is open

If Excel does this, you could find out by simply trying to open the file. It'll fail if it's already open.
Actually, this is not true. Under cygwin perl I was able to open (using open) for writing a file that was currently opened by Excel. Trying to open that same file using WordPad, however, resulted in the familiar "The document ... is in use by another application ..." message.

Replies are listed 'Best First'.
Re^3: Finding if a file is open
by ikegami (Patriarch) on May 15, 2008 at 15:29 UTC
    I said "If Excel does this". All you've shown is that Excel could be using some form of advisory locking instead that WordPad obeys.