287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
# File 'lib/Cells/workbook.rb', line 287
def unprotect_workbook password
begin
if @filename == ''
raise 'Base file name not specified'
end
fields_array = Hash.new
fields_array['Password'] = password
json_data = fields_array.to_json
str_uri = $product_uri + '/cells/' + @filename + '/protection'
signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
response = RestClient.delete(signed_uri,json_data,:accept=>'application/json')
json = JSON.parse(response)
if json['Code']==200
return true
else
return false
end
rescue Exception=>e
print e
end
end
|