Activate Sheet
Activates a sheet by name or index, making it the active worksheet for subsequent operations.
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 the node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If ContinueOnError property is true, no error is caught when the project is executed even if the Catch node is used.
Input
- File Descriptor - File descriptor of the Excel file. This is the identifier returned by the Open Excel node.
Output
This node has no output.
Options
- Sheet Name - Name of the sheet to activate (e.g.,
"Sales Data","Summary"). Use either Sheet Name or Sheet Index, not both. - Sheet Index - Index of the sheet to activate (1-based, e.g.,
1for the first sheet,2for the second). Use either Sheet Name or Sheet Index, not both.
Example
Activating a sheet by name:
// File Descriptor: message.excel_fd
// Sheet Name: "Sales Data"
// Sheet Index: (leave empty)
Activating a sheet by index:
// File Descriptor: message.excel_fd
// Sheet Name: (leave empty)
// Sheet Index: 2 // Activates the second sheet
Switching between sheets in a workflow:
// 1. Open Excel
// Out File Descriptor: excel_fd
// 2. Activate first sheet
// Sheet Index: 1
// 3. Read data from first sheet...
// 4. Activate second sheet
// Sheet Index: 2
// 5. Write data to second sheet...
Tips
- Provide either Sheet Name or Sheet Index, not both. If both are provided, Sheet Index takes precedence.
- Sheet indices are 1-based (the first sheet is 1, not 0).
- After activating a sheet, all subsequent operations (like Read Cell, Set Range, etc.) will work on the active sheet.
- Use Get Sheets node to discover available sheet names and indices.
Common Errors
| Error | Solution |
|---|---|
| Sheet Name and Sheet Index cannot both be empty | Provide either a sheet name or index |
| Sheet Index is not valid | Ensure the index is a valid integer |
| Sheet Index must be equal or greater than 1 | Use 1-based indexing (first sheet is 1) |
| Sheet does not exist | Verify the sheet name is correct or the index is within range |
| Invalid File Descriptor | Ensure the Open Excel node was executed first |