We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Make column as read-only insted of whole worksheet


I need to lock the perticular column to protect making changes to column by users. That locked column should be read-only, it could not be editable and users can edit other columns.

The following code is not allowing me to lock the column.

Aspose.Cells.Style s = oWorksheet.Cells.Rows[1].Style;
s.IsLocked = true;
StyleFlag sf = new StyleFlag();
sf.Locked = true;
oWorksheet.Cells.Rows[1].ApplyStyle(s, sf);

The following statement is locking the columns properly, but making whole document as read-only.

Please suggest me how can i achieve this without locking whole worksheet?



Please check the document for your reference:

Thank you.