Create Worksheet
Creates a new worksheet in an existing Excel workbook. The worksheet is added at the end of the workbook.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is set to true, no error is caught when the project is executed even if a Catch node is used.
Input
- Client Id - The client ID from the Connect node (optional if using direct credentials).
- Workbook Id - The workbook ID from Get Workbook or Create Workbook node.
- Worksheet Name - Name for the new worksheet. Must be unique within the workbook.
Options
- Credentials - OAuth2 credentials (optional, alternative to using Client ID).
- Make Active - Currently not supported by Microsoft Graph API. This option is noted but has no effect.
Output
-
Worksheet Info - Object containing the created worksheet's metadata:
Id: Worksheet IDName: Worksheet namePosition: Position in the workbookVisibility: Worksheet visibilityUsedRange: null (new worksheets have no data)IsActive: Boolean from Make Active option (informational only)
-
Worksheet Id - The worksheet ID for subsequent operations on this sheet.
Examples
Create New Worksheet:
// Input
Client Id: ${client_id}
Workbook Id: ${workbook_id}
Worksheet Name: "Monthly Report"
// Output - worksheet_id
"worksheet-id-456"
// Output - worksheet info
{
"Id": "worksheet-id-456",
"Name": "Monthly Report",
"Position": 2,
"Visibility": "visible",
"UsedRange": null
}
Create and Populate:
Get Workbook
→ Create Worksheet (name: "Data Export")
→ Set Cell Value (add headers)
→ Set Range (add data)
Use Cases
- Add new sheets for different data categories
- Create monthly/yearly report sheets
- Separate raw data from calculations
- Organize workbook by creating topic-specific sheets
- Generate templated worksheets
Tips
- Worksheet names must be unique - duplicate names will cause an error
- New worksheets are always created at the end of the workbook
- The worksheet is empty when created - use Set Cell Value or Set Range to add data
- Microsoft Graph API doesn't support setting an "active" worksheet like desktop Excel
- Maximum worksheet name length is 31 characters
- Avoid special characters in worksheet names (avoid: \ / ? * [ ])
Common Errors
ErrInvalidArg - "Workbook ID cannot be empty"
- Solution: Ensure you've called Get Workbook first
ErrInvalidArg - "Worksheet name cannot be empty"
- Solution: Provide a name for the new worksheet
ErrConflict - "Worksheet already exists"
- Solution: Choose a different name - worksheet names must be unique
ErrInvalidArg - "Invalid worksheet name"
- Solution: Avoid special characters and keep name under 32 characters
ErrNotFound - "Workbook not found"
- Solution: Verify the workbook ID is correct and the workbook exists