'Set the password and protection options of the worksheet.
Args:
password: An optional password string.
options:  A dictionary of worksheet objects to protect.
Returns:
Nothing.'

def protect(self, password='', options=None):

    if (password != ''):
        password = self._encode_password(password)
    if (not options):
        options = {}
    defaults = {'sheet': True, 'content': False, 'objects': False, 'scenarios': False, 'format_cells': False, 'format_columns': False, 'format_rows': False, 'insert_columns': False, 'insert_rows': False, 'insert_hyperlinks': False, 'delete_columns': False, 'delete_rows': False, 'select_locked_cells': True, 'sort': False, 'autofilter': False, 'pivot_tables': False, 'select_unlocked_cells': True}
    for key in options.keys():
        if (key in defaults):
            defaults[key] = options[key]
        else:
            warn(("Unknown    protection    object:    '%s'" % key))
    defaults['password'] = password
    self.protect_options = defaults
