// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-dotnet/ namespace Aspose.Cells.Cloud.SDK.Example { using Aspose.Cells.Cloud.SDK.Api; using Aspose.Cells.Cloud.SDK.Request; using System; using System.Collections.Generic; using System.IO; public partial class CellsApiExample { public void PostProtectPdfExample() { CellsApi cellsApi = new CellsApi(Environment.GetEnvironmentVariable("CellsCloudTestClientId"), Environment.GetEnvironmentVariable("CellsCloudTestClientSecret")); IDictionary<string, Stream> mapFiles = new Dictionary<string, Stream>(); mapFiles.Add("assemblytest.xlsx", File.OpenRead(@".\TestData\assemblytest.xlsx")); mapFiles.Add("datasource.xlsx", File.OpenRead(@".\TestData\datasource.xlsx")); PostProtectRequest request = new PostProtectRequest { File = mapFiles, password = "asposelock" }; cellsApi.PostProtect(request); } } }