Skip to main content

Clear Sheet

Clears all content from a specific sheet, removing all cell values and formatting.

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 clear (e.g., "Data", "Temp").

Output

This node has no output.

Options

This node has no additional options.

Example

Clearing a temporary sheet:

// File Descriptor: message.excel_fd
// Sheet Name: "Temp Data"
// All content in "Temp Data" sheet is removed

Clearing a sheet before populating new data:

// 1. Clear Sheet
// Sheet Name: "Monthly Report"

// 2. Activate Sheet
// Sheet Name: "Monthly Report"

// 3. Set Range
// Write new data to the cleared sheet

Clearing multiple sheets:

// Loop through sheet names
// Sheet Name: message.sheet_name

Tips

  • This operation clears all content and formatting from the sheet.
  • The sheet structure remains (it's not deleted, just emptied).
  • Use Delete Sheet if you want to remove the sheet entirely.
  • For clearing only a specific range, use Clear Range.
  • The sheet becomes a completely blank worksheet after this operation.
  • Any charts, images, or objects on the sheet are also removed.

Common Errors

ErrorSolution
Sheet Name cannot be emptyProvide the name of the sheet to clear
Sheet does not existVerify the sheet name is correct (case-sensitive)
Invalid File DescriptorEnsure the Open Excel node was executed first