Use Create Worksheet to add one empty worksheet to an existing .xlsx workbook in OneDrive for Business or a SharePoint document library. You can provide a worksheet name or let Microsoft Excel assign one.
Step Library: Microsoft Excel > Worksheet management
When to use this step
Use this step when you want to:
- add a new worksheet to an existing workbook;
- address the workbook through a selected Microsoft 365 file, a Microsoft Excel Workbook Object, or drive and item IDs; or
- make the created worksheet available to following Microsoft Excel steps.
Common examples include:
- adding a monthly worksheet to a reporting workbook;
- creating a worksheet for a new project, customer, or case; or
- creating a worksheet before adding rows, ranges, or tables.
Use Create Workbook instead when the workbook does not exist yet. Use Rename Worksheet when you want to change the name of an existing worksheet.
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. - 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 Create 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.
- Optional: Enter a Worksheet name or select a Text variable. When omitted, Microsoft Excel assigns the name.
- 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 name | No | Fixed Text or Text variable | Always | Name for the new worksheet. There is no default; when omitted, Microsoft Excel assigns the name. A supplied 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. |
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 to the created worksheet. It contains ID, Name, Position, and Visibility. No output is exposed when creation 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. |
Worksheet object
| Property | Type | Description |
|---|---|---|
| ID | Text | Stable worksheet ID returned by Microsoft Graph. |
| Name | Text | Worksheet name returned by Microsoft Graph, including an automatically assigned name. |
| Position | Number | One-based position of the worksheet in the workbook. |
| Visibility | Text | Worksheet visibility returned as Visible, Hidden, or VeryHidden. |
Runtime behavior
Execution and completion
When the step runs, Flowifier:
- Resolves the selected connection and workbook reference.
- Resolves and validates Worksheet name when it is configured.
- Opens a persistent Microsoft Excel workbook session.
- Requests creation of one empty worksheet, using the configured name or Microsoft Excel’s assigned name.
- Validates the Microsoft Graph response, exposes Worksheet, and completes the step. The workbook session is then closed on a best-effort basis.
Worksheet creation is an externally visible side effect. The new worksheet remains in the workbook if a later workflow step fails. Running the step again creates another worksheet when Microsoft Excel can assign a new name; running it again with the same fixed name fails because worksheet names must be unique within a workbook.
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-creation request is not automatically retried. Safe session setup requests may retry transient throttling or service errors before the worksheet-creation request is sent.
If validation, authentication, permission, provider, or response validation fails, the step fails and the workflow does not continue along its normal execution path. No Worksheet output is exposed.
Because worksheet creation 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 exist even though the step failed. Inspect the workbook before starting another execution. Concurrent executions with the same new worksheet name result in one worksheet at most; the execution that loses the name conflict fails.
Cancellation or termination does not remove a worksheet that Microsoft Graph has already created.
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 and the settings shown for the selected Workbook source. |
| A fixed Worksheet name is invalid | 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 creating the worksheet and reports the invalid workbook or worksheet-name input. | Ensure the 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 and does not expose Worksheet. | Select an accessible .xlsx workbook, or correct Drive ID and Item ID. |
| A worksheet with the configured name already exists | The step fails with An Excel worksheet with this name already exists. Choose a different worksheet name and try again. No worksheet is added. |
Use another worksheet name, remove the configured name to let Microsoft Excel assign one, or use Rename Worksheet for an existing worksheet. |
| Two executions concurrently use the same new worksheet name | One execution can create the worksheet; the other fails with the duplicate-name message. No duplicate worksheet is created. | Treat the successful execution as authoritative and choose a different name before retrying the failed execution. |
| 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 or cannot confirm the worksheet-creation result | The step fails without automatically retrying the creation request. The worksheet might already exist when the outcome is unknown. | Inspect the workbook first. If no worksheet was created, wait if necessary and start a new execution. |
Example
Add a summary worksheet to a new workbook
Goal: Add a named summary worksheet to a workbook created earlier in the workflow and make the worksheet available to following Excel steps.
Configuration:
-
Connection:
Finance Microsoft Excel -
Workbook source:
Workbook variable - Workbook variable: Workbook output from Create Workbook
-
Worksheet name:
Summary
Result: Flowifier adds one empty worksheet named Summary. The Worksheet output identifies the new worksheet and can be selected by following Microsoft Excel steps. If Summary already exists, the step fails and does not add another worksheet.
Related information
-
Create Workbook — create a new
.xlsxworkbook before adding worksheets. - List Worksheets — retrieve the worksheets in an existing workbook.
- Rename Worksheet — change the name of an existing worksheet.
- Microsoft Excel connections — connect a Microsoft work or school account and authorize workbook access.
- Workflow variables — supply dynamic workbook identities and worksheet names.
- Microsoft Graph: Create worksheet — provider API behavior for adding a worksheet.
Comments
0 comments
Please sign in to leave a comment.