So the regular reasons I get involved with excel are due to the fact I have a customer that one of the following:
- The users should be able to edit but not delete any excel file.
- The users should be able to edit but not create new excel files.
- A report of something.
The last seems like the hardest, but neither of the first are possible at all. Both of these seem quite simple, just deny create file or the delete rights. But it’s not that simple. It has been tried more than once and been asked 1000 times on forums around the world. So what does really happen and why?
Excel will create a temporary file to make sure that the contents is ALWAYS on disk even if your computer fails during the save. Below is a more complete version of what happens.
So you really wanna know what happens. So just for that reason I have created a Process Monitor dump of a save file, I have filtered out 71% as that is more information than needed. Excel will open and close files more due to the way it reads information.
So basically excel will take the following steps for saving an open file:
- Generate a random filename.
- Check that the filename is not in use.
- Create a new file with that name.
- Store the data in the new file.
- Close the new file.
- Generate a random name for the old excel file.
- Check that the filename is not in use.
- Copy the rights to the new file from the old.
- Rename the excel file to the generated name.
- Rename the new file to the old name.
- Remove the old excel file.
- Read the entire excel file.
Microsoft official comment about this matter: Description of the way that Excel saves files