C# Aspose.Cells - Excel Password protected

I want to create an excel with password protected.When I open the excel, it should pop up for the password. I am using Encryption files which comes in aspose.cells. Below is my code.

Workbook workbook = new Workbook();

workbook.Open((@"F:\test\encryptedBook1.xls");

workbook.SetEncryptionOptions(EncryptionType.XOR, 40);

workbook.SetEncryptionOptions(EncryptionType.StrongCryptographicProvider, 128);

workbook.Password = "1234";

workbook.Save(@"F:\test\encryptedBook1.xls");

But it says "aspose.cells.workbook does not contain definition SetEncryptionOptions". Am I missing using any other directives apart from apsose.cells? Can any you please help me in this regard?

Hi,

Well, the API Workbook.SetEncryptionOptions is there in the newer versions of the product like 4.7.1, 4.8.0 etc. I think you are using some older version of the product. Please try new version of the product. I have attached the latest version/fix 4.8.0.5 here for your need.

Thank you.