Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to open a file on a network share, when it is already in use Excel tells me :

<file> is locked for editing

by ' '.

Then offers to let me open it as read only.

My question is where is Excel getting (or not getting) the user name, the users log into a windows domain (samba) with unique user ids and they all have user names defined in their local copies of Excel.

Till about a month ago Excel was returning the correct user name.

share|improve this question
It's been locked by a ninja. – May 9 '12 at 9:29 Ninjas, again! They're worse than the mice. – Tim the Enchanter May 9 '12 at 10:13
up vote 0 down vote accepted

I've got this from a source:

If I recall correctly, the "user name" is actually the name set in the Excel Options, rather than the actual user that's logged on.

As such, it could quite easily be any old rubbish.

Have you checked the open files on the share to find out if anyone really has it open?

A possible cause (source):

When Excel opens a file it creates a temporary copy of the file, and then as you work with it it makes changes to that file. When you save the file it then deletes the original, replaces with the temp file and delets the temp file. If the machine or app crashes before this happens you can get stuck with the temp file nor being deleted. Next time you open the file, Excel will attempt to create a temp file and realise that one is already there, hence the message that the file is already open.

Try deleting all files in the temp directories on both his machine and the server (may have to reboot).

If you want to open it without knowing who has it, check these methods:

  1. Go to Computer Management where Shared Folders may help. Open a run box, type Compmgmt.msc, then go to Shared Folders and look at Open Files.

  2. Try the NET FILE command. Open a run box, type CMD to open a command prompt. At the prompt, type NET FILE. It will show any remote users with files open on the current machine.

  3. If those 2 methods fail, go here:

This SysInternal tool will show you any process that is locking a file. This is your answer if the other two simpler methods dont turn up any leads.

share|improve this answer
Thanks, I did find that page and I checked the User name in Excel options of the person who is locking it and it is set correctly. The file is definitely open, the file is shared on a linux server so the three suggestions don't apply. – Tim the Enchanter May 9 '12 at 9:43
@Tim: smbstatus should work, then. – grawity May 9 '12 at 11:21
@grawity smbstatus does work but it is more of a windows UI display niggle, the windows users can't see who has locked it even though smbstatus confirms that it is locked and who locked it. – Tim the Enchanter May 9 '12 at 12:17
@TimtheEnchanter: so, you still can't unlock the sheet or is there another issue? – Terry May 9 '12 at 12:30
@djerry it is just the dialogue that the users see is completely unhelpful because it shews blank, the locking works apart from that. – Tim the Enchanter May 9 '12 at 12:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .