Update document password

GroupDocs.Merger allows to update password from password-protected document. The resultant document will have new password.
Here are the steps to update document password:

The following code sample demonstrates how to update document password:

load_options = gm.domain.options.LoadOptions("SomePasswordString")
with gm.Merger(constants.sample_xlsx_protected, load_options) as merger:
    update_password_options = gm.domain.options.UpdatePasswordOptions("OtherPasswordString")
    merger.update_password(update_password_options)
    merger.save(constants.output_xlsx)