Use Rename Worksheet to change the name of one existing worksheet in an .xlsx workbook in OneDrive for Business or a SharePoint document library. The step preserves the worksheet's contents, identity, position, and visibility.
Step Library: Microsoft Excel > Worksheet management
When to use this step
Use this step when you want to:
- rename a specific worksheet without replacing or deleting it;
- address the workbook through a selected Microsoft 365 file, a Microsoft Excel Workbook Object, or drive and item IDs; or
- identify the worksheet through the provider picker, a fixed worksheet ID or exact name, or a Text variable.
Common examples include:
- changing a staging worksheet to its final reporting-period name;
- applying a customer, project, or case name calculated earlier in the workflow; or
- standardizing worksheet names before later Microsoft Excel steps use them.
Use Create Worksheet when you need another worksheet. Use Delete Worksheet when the complete worksheet and its contents must be removed.
Before you begin
- Create or select a Microsoft Excel connection that uses a Microsoft work or school account. The connection requires delegated
Files.ReadWritepermission. - Ensure the connected account can edit the target
.xlsxworkbook. - Ensure the intended name is not already used by another worksheet in the workbook.
- If you use a Microsoft Excel Workbook Object, make it available as a workflow variable or as the Workbook output of an earlier step.
Configure the step
- Add Rename Worksheet from Microsoft Excel > Worksheet management.
- Select the step to open its configuration panel.
- Select the Microsoft Excel Connection.
- In Workbook source, select Microsoft 365 file, Workbook variable, or Drive and item IDs, then configure the displayed workbook settings.
- Select the Worksheet, enter its ID or exact name, or select a Text variable.
- Under New name, enter the new Worksheet name or select a Text variable.
- Save or publish the workflow.
Settings
| Setting | Required | Accepted values | Visible when | Description |
|---|---|---|---|---|
| Connection | Yes | Microsoft Excel connection | Always | Connection used to access Microsoft Graph. There is no default. The connection must be available to the workflow, remain authorized, and have write access to the workbook. |
| Workbook source | Yes |
Microsoft 365 file, Workbook variable, or Drive and item IDs
|
Always | Selects how the workbook is identified. The default is Microsoft 365 file. |
| Workbook file | Yes | Selected .xlsx file or an Object variable with schema @microsoft/drive-item-reference@v1
|
Workbook source = Microsoft 365 file |
Supplies the workbook's drive and item identity. There is no default file. At runtime, the selected value or variable must resolve to an accessible .xlsx file. |
| Workbook variable | Yes | Object variable or step output with schema microsoft-excel/workbook@1
|
Workbook source = Workbook variable |
Supplies a workbook reference published by a previous Microsoft Excel step or stored in a compatible Object variable. There is no default. The resolved Object must contain non-empty Drive ID and Item ID values. |
| Drive ID | Yes | Fixed Text or Text variable | Workbook source = Drive and item IDs |
Identifies the OneDrive for Business or SharePoint drive. There is no default. The resolved value must not be empty. |
| Item ID | Yes | Fixed Text or Text variable | Workbook source = Drive and item IDs |
Identifies the .xlsx workbook within the selected drive. There is no default. The resolved value must not be empty. |
| Worksheet | Yes | Provider-selected worksheet, fixed worksheet ID or exact name, or Text variable | Always | Identifies the worksheet to rename. There is no default. The provider picker is available when the connection and workbook have fixed identities. Fixed and variable values must not be empty. At runtime, the value must match a current worksheet ID or exact name. |
| Worksheet name | Yes | Fixed Text or Text variable | Always | Supplies the new name. There is no default. The resolved value must contain 1–31 characters, contain none of \ / ? * : [ ], not begin or end with an apostrophe, and not equal the reserved name History (case-insensitive). Empty or whitespace-only resolved values are invalid. The name must not already belong to another worksheet in the same workbook. |
Data and outputs
Workflow variable effects
This step does not modify workflow variables.
Step outputs
| Step output | Type | Available when | Scope | Description |
|---|---|---|---|---|
| Worksheet | Object — Microsoft Excel Worksheet (microsoft-excel/worksheet@1) |
After successful completion | Following steps in the current workflow context until the execution path ends | Reference returned by Microsoft Graph after the rename. It contains ID, the updated Name, Position, Visibility, and optional Is Visible. No output is exposed when the rename or provider-response validation fails. |
| Workbook | Object — Microsoft Excel Workbook (microsoft-excel/workbook@1) |
After successful completion | Following steps in the current workflow context until the execution path ends | Reusable reference to the resolved workbook. It always contains Drive ID and Item ID; Name and Web URL are included when the selected input provides them. It is not exposed when the step fails. |
Runtime behavior
Execution and completion
When the step runs, Flowifier:
- Resolves the selected connection, workbook reference, Worksheet, and Worksheet name, including configured variables.
- Validates the resolved workbook identity and worksheet name.
- Opens a persistent Microsoft Excel workbook session.
- Sends one worksheet update request to Microsoft Graph using the configured worksheet ID or exact name.
- Validates the updated worksheet returned by Microsoft Graph.
- Exposes Worksheet and Workbook and completes the step after Microsoft Graph confirms the rename. The workbook session is then closed on a best-effort basis.
Renaming is an externally visible side effect. The worksheet's contents, identity, position, and visibility remain unchanged; only its name changes. The rename is not reversed if a later workflow step fails. Running the same configuration again does not create a worksheet or duplicate data; it sends another rename request for the configured worksheet.
Branches and child steps
This step does not have branches or child steps.
Failure, retry and resume behavior
This step does not suspend execution and has no resume point. The worksheet update request is not automatically retried. Safe session setup requests may retry transient throttling or service errors before the update request is sent.
If validation, authentication, permission, workbook, worksheet, or provider validation fails before the rename, the step fails and the workflow does not continue along its normal execution path. The workbook remains unchanged and no step outputs are exposed.
Because renaming is a mutation, a network interruption, timeout, or service failure after Microsoft Graph receives the request can leave the outcome unknown. The worksheet might already have the new name even though the step failed. Inspect the workbook before starting another execution. Cancellation or termination does not reverse a rename that Microsoft Graph has already applied.
Errors and limits
| Situation | Result | Resolution |
|---|---|---|
| A required fixed setting is missing | Designer validation reports the affected setting and prevents a valid publish. | Complete Connection, the settings shown for the selected Workbook source, Worksheet, and Worksheet name. |
A fixed worksheet name is empty, longer than 31 characters, contains a forbidden character, begins or ends with an apostrophe, or equals History
|
Designer validation reports that a valid worksheet name is required. | Use 1–31 supported characters, remove leading or trailing apostrophes, and do not use History. |
| A variable is missing, has the wrong type or Object schema, or resolves to an empty or invalid value | The step fails before renaming the worksheet and reports the invalid workbook, worksheet, or worksheet-name input. | Ensure each variable exists, has the compatible type or schema, and resolves to a value accepted by its setting. |
The configured workbook does not exist, is inaccessible, or is not a supported .xlsx workbook |
The step fails without renaming a worksheet or exposing outputs. | Select an accessible .xlsx workbook, or correct Drive ID and Item ID. |
| The configured worksheet ID or exact name does not exist | The step fails with A required resource is no longer available. Select or create another resource and try again. No worksheet is renamed. |
Select a current worksheet, correct the fixed ID or exact name, or update the Text variable. |
| Another worksheet already uses the new name | The step fails with The provider could not apply the change because the resource changed or already exists. Review the target and try again. No duplicate worksheet is created. |
Choose a name that is not used by another worksheet, then start a new execution. |
| The same configuration runs again after a successful rename | No duplicate worksheet is created. The request targets the same worksheet and name. | No recovery is required when the repeated execution succeeds. If it fails, inspect the worksheet before retrying. |
| The connection is unavailable, expired, or lacks permission | The step fails without exposing connection credentials or provider details. | Reconnect Microsoft Excel, grant the required permission, confirm workflow access to the connection, and verify write access to the workbook. |
| Microsoft Graph throttles, times out, becomes unavailable, or cannot confirm the rename result | The step fails without automatically retrying the rename request. If the request reached Microsoft Graph, the worksheet might already have the new name and the outcome is unknown. | Inspect the workbook first. If the old name remains, wait if necessary and start a new execution. |
The worksheet name is limited to 31 characters. The step has no other step-specific numeric limits beyond Microsoft Excel's workbook and worksheet constraints and the general workflow limits.
Example
Give a monthly worksheet its final name
Goal: Rename a staging worksheet after a monthly reporting process and make the updated worksheet and workbook available to following steps.
Configuration:
-
Connection:
Finance Microsoft Excel -
Workbook source:
Microsoft 365 file -
Workbook file:
Finance / Reporting / Monthly close.xlsx -
Worksheet:
Current month -
Worksheet name:
November 2026
Result: Flowifier renames Current month to November 2026 without changing the worksheet's contents, position, or visibility. Following steps can use the renamed worksheet through Worksheet and reuse the workbook through Workbook.
Related information
- Create Worksheet — add a worksheet to an existing workbook.
- List Worksheets — retrieve current worksheet IDs, names, positions, and visibility.
- Delete Worksheet — permanently remove a worksheet and its contents.
- Microsoft Excel connections — connect a Microsoft work or school account and authorize workbook access.
- Workflow variables — supply dynamic workbook identities, worksheet references, and worksheet names.
- Microsoft Graph: Update worksheet — provider API behavior for renaming a worksheet.
Comments
0 comments
Please sign in to leave a comment.