Skip to main content

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., 1 for the first sheet, 2 for 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

ErrorSolution
Sheet Name and Sheet Index cannot both be emptyProvide either a sheet name or index
Sheet Index is not validEnsure the index is a valid integer
Sheet Index must be equal or greater than 1Use 1-based indexing (first sheet is 1)
Sheet does not existVerify the sheet name is correct or the index is within range
Invalid File DescriptorEnsure the Open Excel node was executed first