Definition and Usage
This command renames a specified worksheet in an Excel file. It allows you to change the name of an existing worksheet, either by targeting a specific worksheet by name or by renaming the currently active worksheet.
Parameter Values
Input parameters
Parameter | Description | Required | Options / Notes |
Excel instance | Please select an Excel instance (created via the "Launch Excel" or "Get active Excel worksheet" command) to identify the instance to operate on. | Yes | Must reference a valid Excel instance |
Worksheet name | Specify the worksheet to rename. Leave blank to rename the active worksheet | No | If left blank, the currently active worksheet will be renamed |
New worksheet name | Enter the new name for the worksheet | Yes | The name must follow Excel worksheet naming conventions |
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
This action doesn't produce any variables.
Using Variables in Conditions
You can use variables in the parameter fields where you see the {x} icon. This allows you to dynamically specify the Excel instance, worksheet name, or new name based on values calculated or retrieved earlier in your workflow. For example, you might use a variable to store a worksheet name from user input or from another data source, and then use that variable in this command.
Notes
Before using this command, ensure that a valid Excel instance has been created using commands like "Launch Excel" or "Get active Excel worksheet".
The new worksheet name must comply with Excel's naming conventions: it cannot exceed 31 characters, cannot contain characters like : / \ ? * [ ], and cannot be blank.
If the specified worksheet does not exist, the command will fail.
Excel does not allow duplicate worksheet names within the same workbook, so the command will fail if you try to rename a worksheet to a name that already exists.
This command only renames the worksheet; it does not modify the content within the worksheet.