Secure Worksheet

This activity is used to secure a single worksheet in a whole workbook.

Technical Reference:

 

 

 

INPUT

Password: Specify the password to lock the worksheet

SheetName: Specify the name of the sheet to be protected or unprotected.

Type: Choose to protect or unprotect the worksheet

 

 

 

 

 

 

MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False.”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the excel automation feature in use

OUTPUT

Result: Define a Boolean value to validate the success state of the activity. This is not a mandatory activity.

*Mandatory field to read the workbook

The following activity illustrates on how we can use the secure worksheet activity to protect/unprotect a specific sheet in a workbook.

Example:

1.      Drag and drop a get excel object activity to the workflow.

2.      Enter the file path of the excel file in which the worksheet to be worked on is present.

3.      Drag and drop a secure worksheet activity.

4.      Click on the activity.

5.      Assign a password to the worksheet in the password box.

6.      Specify the name of the sheet to be protected. Here it is “test”

7.      Choose the type. Here we are going to use “Protect”.

8.      Execute the activity.

The bot executes the activity and assigns a password to the worksheet. If we have to edit anything in the worksheet, we need to use the secure worksheet activity to unprotect the sheet or we can click on Review option from excel and click on unprotect sheet to enter the password.