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:

  1. Generate a random filename.
  2. Check that the filename is not in use.
  3. Create a new file with that name.
  4. Store the data in the new file.
  5. Close the new file.
  6. Generate a random name for the old excel file.
  7. Check that the filename is not in use.
  8. Copy the rights to the new file from the old.
  9. Rename the excel file to the generated name.
  10. Rename the new file to the old name.
  11. Remove the old excel file.
  12. Read the entire excel file.
Procmon showing what happens excel saves a file.

Microsoft official comment about this matter: Description of the way that Excel saves files