Method: Aspose::Cloud::Cells::Workbook#clear_modify_password

Defined in:
lib/Cells/workbook.rb

#clear_modify_password(password = '') ⇒ Object



331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/Cells/workbook.rb', line 331

def clear_modify_password 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 + '/writeProtection'
    signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
    response = RestClient.delete(signed_uri,json_data, 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