I am using Aspose.Cells workbook and worksheet objects to protect with a password. Once the xlsx is created with this code, i am able to unprotect the workbook using the password. but the unprotect sheet doesnt work. i get error “The password you supplied is not correct. Verify that the CAPS LOCK key is off and be sure to use the correct capitalization.”.
i also tried it through code by using Unprotect but that doesnt work either.
I need this to support business requirements. Any help is appreciated. TIA
var iWSCount = workbook.Worksheets.Count;
for (int i = 0; i < iWSCount; i++)
{
Worksheet wk = workbook.Worksheets[i];
wk.Protect(ProtectionType.All, "test", "");
}