How to protect Excel cells contents in Excel worksheet and also in its xml file format? I want cells to be read only.

link|improve this question
feedback

migrated from stackoverflow.com Apr 22 '10 at 8:48

This question came from our site for professional and enthusiast programmers.

3 Answers

You should make the file read-only. Find the file in explorer, right click, then select "Read-Only", then select OK.

There is no way to do it on individual cells of an XML file, you can only do it to the whole file.

link|improve this answer
feedback

I don't think this is possible for the XML file format. Binary Excel files can be protected usign the regular means (workbook/worksheet protection, or file protection, or both).

link|improve this answer
feedback

If you want to make cells in a excel sheet read-only, you can do:

  • Populate the cell
  • Choose Data -> Validation
  • Use Custom for Allow
  • Use the formula =""
link|improve this answer
This won't do anything different from what normal sheet protection already does. It does add unnecessary complexity and size to the file itself. Best just to make the cells protected (in the format cells > protection dialog) then password protect the sheet and workbook. It's not perfect, but it will help. – guitarthrower Apr 22 '10 at 15:42
feedback

Your Answer

 
or
required, but never shown