I have another Excel question Naps:
I want to change the default protection choices. I found this:
The worksheet protection feature lets specify a set of options that will be available to the user when protection is enforced. For example, you may want to allow the user to insert and delete rows, but restrict the insertion and deletion of columns.
To achieve that, you need to pass a WorksheetProtectionOptions instance as the second argument of the Protect() method.
Example 3 demonstrates how to protect a worksheet using WorksheetProtectionOptions.
[C#] Example 3: Protect Worksheet with WorksheetProtectionOptions
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets.Add();
WorksheetProtectionOptions options = new WorksheetProtectionOptions(allowInsertRows: true, allowDeleteRows: true);
The WorksheetProtectionOptions class exposes the following options:
- Insert columns
- Insert rows
- Delete columns
- Delete rows