Thanks for your posting and using Aspose.Cells for .NET.
Please use the following code to password protect your file. The output file will not open unless you provide a password.
Workbook workbook = new Workbook();
workbook.Settings.Password = “123”;
Thanks for your posting and using Aspose.Cells.
We are glad to know your issue is resolved now. Please feel free to contact us if you encounter any other issue, we will be happy to help you more.