lib/spreadsheet/worksheet.rb
def protect! password = ''
      @protected = true
      password = password.to_s
      if password.size == 0
        @password_hash = 0
      else
        @password_hash = Excel::Password.password_hash password
      end
    end
def protect! password = ''
      @protected = true
      password = password.to_s
      if password.size == 0
        @password_hash = 0
      else
        @password_hash = Excel::Password.password_hash password
      end
    end
def protect! password = '' @protected = true password = password . to_s if password . size == 0 @password_hash = 0 else @password_hash = Excel :: Password . password_hash password end end
Set worklist protection
Set worklist protection