# For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-perl/ use strict; use warnings; use utf8; use File::Slurp; use MIME::Base64; use AsposeCellsCloud::CellsApi; my $config = AsposeCellsCloud::Configuration->new( client_id => $ENV{'ProductClientId'}, client_secret => $ENV{'ProductClientSecret'}); my $instance = AsposeCellsCloud::CellsApi->new(AsposeCellsCloud::ApiClient->new( $config)); my $remoteFolder = 'TestData/In'; my $remoteName = 'Book1.xlsx'; my $protection = AsposeCellsCloud::Object::ProtectWorkbookRequest->new(); $protection->{encrypt_with_password} = '123456' ; $protection->{aways_open_read_only} = 'true' ; my $request = AsposeCellsCloud::Request::PostProtectWorkbookRequest->new(); $request->{name} = $remoteName; $request->{protectWorkbookRequest} = $protection; $request->{folder} = $remoteFolder; $request->{storage_name} = ''; my $result = $api->post_protect_workbook(request=> $request);