Unplanned
Last Updated: 18 Feb 2026 22:56 by Doug
Roy
Created on: 12 Jun 2024 10:09
Category: Spreadsheet
Type: Feature Request
10
Honor protected (ReadOnly) worksheet and workbook

Please add support for protected worksheets and protected workbooks.

1 comment
Doug
Posted on: 18 Feb 2026 22:56

I used to have a way around this using the code below when I was on version 7. In version 13 this no longer works and yet I see no reference to the spreadsheet component in the version history. Something obviously changed and now I have no way of marking cells as read only like I did in v7. This way wasn't great but it was the only solution I could find that worked to mark the first row as read only:

            for (var i = 1; i <= Constants.SpreadsheetRows - 1; i++)
            {
                for (int j = 0; j < columnTitles.Count; j++)
                {
                    worksheet.Cells[i, j].SetIsLocked(false);
                }
            }
            worksheet.Protect("pwd", WorksheetProtectionOptions.Default);