Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Apr 22 '10 at 8:48

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

add comment

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.

share|improve this answer
add comment

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.