Link to home
Start Free TrialLog in
Avatar of Uziel
UzielFlag for United States of America

asked on

Excel Lock File

Does anyone know how Excel locks a file?  For example, if I have a document open in Excel, and then I open it in another instance I cannot make changes because the first instance of Excel has "locked" it.

The reason I ask is that I have a problem with Excel crashing.  Because it does not unlock the file, in order to reopen and edit my file I have to reboot my machine.  If I could just delete the lock file then I think I could just start back up at my last save?

Thanks,

Uziel
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Hi Uziel,

difficult do you know why it's crashing? a pattern?

-you can try to clean up the windows/temp dir after a crash

:O)Bruintje

Avatar of Uziel

ASKER

No, it crashes at irregular times.  The latest series is from copying by dragging a sum cell.  That should not happen...

I cleaned the temp file, and hopefully that will work.

Do you understand what I am asking for?  If I knew what file tracked what Excel files are locked, like an Access lock file, then I could just delete it and re-open my file.
yeah i got that, only excel makes it's temp files in the temp directory and by cleaning that one up, i looked once in a while for users to see what those files where named because they had crashes too. but it's a bit difficult you've to look for files named *.xls in the temp dirctory and i'm not even sure they're called .xls or something else
Avatar of Richie_Simonetti
Which version of Excel are you using?, which SP?
Avatar of Uziel

ASKER

Excel 2000 9.0.4402 SR-1

Does that help?
No.
did you try reinstalling SP?
Avatar of Uziel

ASKER

I reinstalled everything.  I cleaned the tmp files.  Nothing really helps...
i'm rereading the Q here

For example, if I have a document open in Excel, and then
I open it in another instance I cannot make changes because the first instance of Excel has "locked" it

do you want to open it two times at the same time?

:O)Bruintje
Avatar of Uziel

ASKER

No.  I want to know if there is a way to "Unlock" a file after I crash.  When I open the file, it becomes locked.  If I crash it stays locked and the only way to unlock it that I know of is to reboot.

It appears like Excel creates a tmp file in c:\%windir%\temp with name: ~DF*.tmp that cannot be read it or edited.
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Uziel

ASKER

Bingo!  That was it.  As soon as I closed the "shadow" excel with the task manager the file became unlocked.

Thanks!
wow glad that did it, funny how we sometimes overlook the most obvious ones to try
Gee, i was thinking that you need a code solution not a "hard-coded" one! :))
Bruintje, i agree with your last comment also.