Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
It's been locked by a ninja. –  ta.speot.is May 9 '12 at 9:29
    
@ta.speot.is Ninjas, again! They're worse than the mice. –  Tim the Enchanter May 9 '12 at 10:13
add comment

1 Answer 1

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: http://technet.microsoft.com/en-us/sysinternals/bb896655

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? –  Djerry 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
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.