I'm using EPPLUS.dll for doing my excel works I tried to protect the worksheet using AllowSort and AllowAutoFilter Properties but it's not working.
worksheet.Protection.AllowSort = true;
worksheet.Protection.AllowAutoFilter = true;
worksheet.Protection.SetPassword("password");
worksheet.Protection.IsProtected = true;
I tried Below Code too but i didn't get my desired result
worksheet.Column(1).Style.Locked = true;
Epplus Lock Cells By default and Locking Cells will not Fix my Problem; the only thing I need is a protected or read-only cell while sorting and Filtering Allowed
any help would be greatly appreciated.
The only way i Found was, using Visual Basic Code inside of that Excel Document which locked right-click and copy-paste options. unfortunately before excel opens the documents, that asks something about dangerous scripts and offer to disable running scripts. at last i was impossible in my case.