Skip to main content

Delete Sheet

Deletes a sheet from the workbook by name.

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.
  • Sheet Name - Name of the sheet to delete (e.g., "Old Data", "Temp").

Output

This node has no output.

Options

This node has no additional options.

Example

Deleting a temporary sheet:

// File Descriptor: message.excel_fd
// Sheet Name: "Temp Calculations"

Cleaning up old sheets:

// Loop through old sheet names
// Sheet Name: message.old_sheet_name

Tips

  • Sheet deletion is permanent and cannot be undone.
  • Excel workbooks must have at least one sheet. You cannot delete the last remaining sheet.
  • If the deleted sheet was the active sheet, Excel automatically activates another sheet.
  • Use Get Sheets to get a list of all sheets before deletion.

Common Errors

ErrorSolution
Sheet Name cannot be emptyProvide the name of the sheet to delete
Sheet does not existVerify the sheet name is correct (case-sensitive)
Cannot delete the last sheetWorkbooks must have at least one sheet
Invalid File DescriptorEnsure the Open Excel node was executed first