Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

migrated from Apr 22 '10 at 8:48

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

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.

share|improve this answer

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).

share|improve this answer

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 =""
share|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

You must log in to answer this question.