Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

*.xls is locked for editing by ' '.

Status
Not open for further replies.

VortigernWolf

IS-IT--Management
Jan 7, 2004
22
GB
Hi

I have a user Windows XP workstation with office XP connected to an SBS 2000 server. The user has a share on the server where he keeps his excel document. The user opens his excel document by selecting it from the recent document list.

But, sometimes the user will recieve the error message:

"stocks1.xls is locked for editing by ' '. Open 'Read-Only' or, click 'Notify' to open read-only and receive notification when the document is no longer in use.

I have tried to follow the microsoft steps for resolving this problem. All the security patches for both XP and Office have been installed. I have edited the register with the changes suggested.

But the problem keeps re-occuring. Am stuck for ideas.

Thanks in advance

Vortigern
 
I'm not really sure how the server side works or if anything has to be done (though doubt anything extra has to be done), but at least in a W2K OS environment, when a file is no longer open, it removes the lock on the file. However, if the application has crashed, it may take the file so much time to unlock itself.

If the file is needed to be unlocked, the IT person should be able to do it as long as it has access to the server tools so as to release the resource from the file.

One other thing that should be done is to have all users enter either their user name or actual name in the User Name file, which from Excel, you can get to this via Tools>Options...>General and the last textbox on the very bottom. The entry of the user name will impact all OS Office applications, so once this has been set for one MS Office application, it's set for all MS Office applications. This will in the long run save you a lot of headaches of trying to find out who has the file locked currently from editing it.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
One possible cause - 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).

Regards
Ken............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Ah, perhaps I should have also mentioned that he is the only user opening these spreadsheets. Also the machine is not showing any sign of crashing.

Thanks for your answers anyway.

Vortigern
 
I never known Excel to create a temporary file when it opens a file. The only time I have known it to create temporary files is when it's attempting to delete the original file (during it's save process), but can't for some reason, then it saves the file to some random name without any extensions. The only thing I have known to take place, an exclusive lock is created on the file when it's openned for read/write (unless it's a shared file).

Excel does open the file into virtual memory in it's entirety, but I'm not sure if this is what you mean by a temporary file.

I have known of Word to create a temporary file by saving it to the original location with a tilde added to the file name at the front of it, and occassionally, it doesn't remove the temporary file, but this hasn't prevented me from openning the original Word file when there's no lock placed on it, even when it's equivalent temp file shows in the same directory.

I even ran a test to see if it stored the file anywhere other than in virtual memory on the HD and it does NOT. All it does is create 1 shortcut link file in a Recent folder, and you can't really call that a temp file cause it has no information in it other than what's needed for the pointer.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
I have the same problem. Windows XP Pro on 3 PC's and running on a third "file server". The shared drive on the File server is FAT32 while the boot disk is NTFS. All three PC's are single drives formatted as NTFS. Each has a mapped drive to a shared drive on the file server where they share files. EVERY office file they open gives this same error EVERY time. The permissions for each user is Full Control for the shared drive and I have even added the 'Everyone' group with Full Control. These files are not in use and are not locked...rebooted, etc.

Any help would be appreciated.
 
I can't say for sure as far if that's your problem or not, but the way permissions works on a FAT32 system works as compared to a NTFS, there's a rather significant difference. One such difference, FAT32 file system only has permissions based on folders (which for Excel files, this normally wouldn't be too big of an issue given the original file is deleted each and every time a save operation takes place on the file, thus inheriting the permissions from the folder). An NTFS file system allows for File level permissions and has more permission settings (at least starting with W2K). Now rather the file level permissions are creating issues or not, I don't know. I learned about these differences in a MCSE training course.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
Ron, do Start / Run / %temp% and either empty it, or count the files in there. Now go open an Excel file and then go back and take another look and you should see one more file. The timestamp should show you which it is.

Mine default to the C:\DOCUME~1\Default\LOCALS~1\Temp folder.

Regards
Ken...............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
rdodge -

I was thinking the same thing. I formatted another drive on the file server as NTFS and saved a file to that disk from one of the PC's and it gives me the same error when I try to open it again. WTF!!

 
Ken,

Thank you for pointing this out. Actually, I went into Windows Explorer to the temp folder and found that it creates 8 different files as the application and workbook is openned. It appears to me that 2 of the files belongs to the workbook that is openned and the other 6 belongs to the application. That's cause when I openned another file, it created 2 more temp files. One of the 2 temp files is specifically related to the macros while the other is related to the workbook itself. If I open a workbook with no macros, it creates only 1 additional temp file.

This is under W2K Pro, SP4 with XL02, SP2.

Temp folder path application uses is:

C:\Documents and Settings\<username>\Local Settings\Temp

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
I get this occasionally on XP as well. teh upside is if you click cancel on the readonly etc options and then try again it works pretty much 100%. I also see this happening when trying to delete files from explorer - I quite often get a &quot;This file is in use by another user or application.....cannot delete file&quot; even when no-one is in the file and I havn't even opened it recently

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top