Want to be able to protet a sheet, so readers cannot alter the data, cannot insert rows and columns, etc.
But are allowed to filter and sort.
I have a table on a sheet, A2:U20.
Row 1 has a title on it.
Row 2 has the filter & sorting functionality (of the table), and the other rows have content.
Existing code:
ws.AddAllowEditRange("Range One", ws.Range["A2:S2"]);
ws.Protect("xxxxxxx", SheetProtectionType.Sorting);
Tried things like:
ws.Protect("xxxxxx", SheetProtectionType.All | SheetProtectionType.DeletingRows | SheetProtectionType.DeletingColumns);
ws.Protect("xxxxxx", SheetProtectionType.None | SheetProtectionType.DeletingRows | SheetProtectionType.DeletingColumns);
ws.Protect("xxxxxx", SheetProtectionType.Sorting | SheetProtectionType.DeletingRows | SheetProtectionType.DeletingColumns);
ws.Protect(SheetProtectionType.DeletingRows);
But with no succes.