'Locked Excel Cells Becoming Unlocked When Re Opened

I have a Blueprism process which is locking a column and protecting the worksheet. The cells are then locked. When the file is saved, closed and re opened the cells are no longer locked.

GetInstance(handle).Activecell.Locked = True
GetInstance(handle).ActiveSheet.Protect


Solution 1:[1]

Issue was I was using a CSV. Doesn't seem to work there but does in a standard Excel Workbook.

Solution 2:[2]

Most of these cases are related to excel Settings, not exactly the Blueprism. I would suggest trying with Options Menu in Excel workbook and Remove Recovery flags as well.

Control+A and format sheet to Text Type and Save Manually First(One Time activity). Sometimes Formatting can be the root cause.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eoin2211
Solution 2 Mukesh Kumar