Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1425
XamSpreadsheet 14.2, Locking a cell not working
posted

I'm trying to setup "non modifiable" column headers so that users can cut/paste or edit to provide values on worksheets. I have successfully set the first row to Frozen, but I also want to protect the cells that contains the column headers so that users cannot modify or delete the cells, but the following code does not work.

worksheet = project.MyWorkbook.Worksheets.Add("historical_injectivity.txt");
worksheet.Protected = true;
for (int i = 0; i < 2.Count; i++)
   {
    worksheet.Rows[0].Cells[i].CellFormat.Locked = ExcelDefaultableBoolean.True;
   }

Can you offer any help?

Parents
No Data
Reply Children
No Data