[Advanced Excel] After Protecting Sheet Formatting Cells To Be Unlocked is Ignored
Question
Forge component by Carlos Freitas

Hi,

I am assuming I am setting this up correctly

My requirement is to lock the header row and block users from adding or removing columns.

I have protected the sheet and left the  allowInsertColumns and allowDeleteColumns as default(false)

set the other allows to true

used the CellFormat_ApplyToRange to set the locked state to false for row 2 column 1 to end of column/row

in the resulting spreadsheet all rows/columns are still locked

when I unprotect sheet and check protection they are in a locked state.

It seems the locked state of the format is being ignored


Same problem here, has anyone come up with a solution?

Hi,

I had the same problem while trying to protect the header of a worksheet.

The workaround used was uploading (as a resource) an excel sheet with the first row locked, and then fill the data in that worksheet, as shown in the oml attached.


Hope this helps,

Pedro

excel.oml

Well it’s a best solution to unlock cells which you need to modify before protecting a workbook or worksheet. But don’t get worried as you can unlock them easily even after applying protection over it. For removing up the protection, all you need to do is just remove the applied password.

To learn how to lock cell in Excel, check out this informative post.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.