Protect Sheet
This article provides information on the following topics:
Note: The Actions Quick Reference provides a complete list of actions that you can print for easy reference.
What is the Protect Sheet Action?
The Protect Sheet Action protects a sheet in a Microsoft Excel workbook. Once the sheet is protected, it can be unprotected manually or by using an Unprotect Sheet Action.
Example
Barry works for a law firm. He receives notice of a new regulation mandating all Excel spreadsheets have their sheets locked if they contain sensitive customer information. This is to prevent employees from changing the information before the file is audited. Barry's company has five years’ worth of spreadsheets that are not protected and upon investigating further, over 2,700 files are found to be unprotected.
Instead of panicking, Barry creates a Nintex RPA script to open each file, protect each sheet with a master password, then save the file. Barry spends 10 minutes writing the script. Nintex RPA spends 35 minutes updating the files. Now, Barry spends his weekend playing golf instead of putting in overtime to finish the job manually.
Creating a Protect Sheet Action
Drag and drop the Selector onto the Targets list in the target workbook to display the available target options. Continue to drag the Selector to the Sheets item, releasing your mouse to display the Target Preview. As an alternative, you may also target the Sheets tab along the bottom of the workbook. If this is the first time the workbook was targeted, Nintex RPA will attempt to create a workbook connection automatically. (For more information about Microsoft Excel workbook connections, read the Excel Connections article.)
A preview of the target is displayed. Select the Protect Sheet Action from the Actions list.
Select the Rules to change the Connection for this Action. Both the Timing and Error settings for this action may be configured to fine tune the how the Action will run.
Note: For more information about Timing and Error settings, read the Action Builder article.
Select the Sheet to prorect. The following sheet options are available:
- Active sheet
- Specific sheet name
- Specific sheet number
If the Specific sheet name orSpecific sheet number options are selected, supply the desired Sheet Name or Sheet Number.
If you wish to protect the sheet using a password, check the Password option and enter the password . You will also be required to Confirm the password .
Optionally add Notes to the Action to document any special instructions or functionality. When the Run Switchis set to Run, the action will be executed after clicking OK.
Note: The run switch is set to Run by default. To create or modify this action without executing it, click the slider to change the option to Don't Run. For more information, see Action Builder.
Click the OK button to save the Action.