Hello,
Is there any way to lock special cell range from editing?
I tried to use sample code from help.
// Give specific user permission to edit a range in a protected worksheet.
ProtectedRange protectedRange = sheet.ProtectedRanges.Add("My Range", sheet["A1:D25"]);
EditRangePermission permission = new EditRangePermission()
{
UserName = "Everyone",
Deny = true,
};
protectedRange.SecurityDescriptor = protectedRange.CreateSecurityDescriptor(new EditRangePermission[] { permission });
protectedRange.SetPassword("asdfgy7a6s78df786as8d");
And it throws exception
"The title 'My Range' contains illegal characters. Range titles may only contain letters, numbers, spaces, and must begin with a letter."
How can I solve this problem?
Regards.
Hello,
I've reproduced this exception and agree that spaces should be allowed in the range name. So, I have passed this issue to our R&D team.
Please watch for our updates. We will notify you as soon as we make any progress.