Delete Column
Deletes or clears a column at the specified position in the active sheet.
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.
- Column Number - Column number to delete or clear (1-based index, e.g.,
1for column A,2for column B).
Output
This node has no output.
Options
- Clear - Determines the deletion behavior. Default is
false.false- Deletes the entire column (columns to the right shift left)true- Clears the column content only (column structure remains, cells are emptied)
Example
Deleting a column (shifts columns left):
// File Descriptor: message.excel_fd
// Column Number: 3
// Clear: false
// Column C is deleted, columns D and beyond shift left
Clearing a column (keeps column structure):
// Column Number: 5
// Clear: true
// Column E is emptied but remains in place
Removing temporary calculation column:
// Column Number: 10 // Column J
// Clear: false
// Deletes column J completely
Clearing multiple columns:
// Loop through columns to clear
// Column Number: message.column_index
// Clear: true
Tips
- When Clear is
false, the column is completely removed and columns to the right shift left. - When Clear is
true, only the content and formatting are removed; the column structure stays. - Use Clear: false to remove unwanted columns and compact your data.
- Use Clear: true to reset a column for reuse while maintaining the structure.
- Column indices are 1-based (column 1 = A, column 2 = B, etc.).
- Be careful when deleting columns in loops - indices change as columns are deleted.
Common Errors
| Error | Solution |
|---|---|
| Column Number must be greater than 0 | Provide a valid column number (1 or higher) |
| Invalid File Descriptor | Ensure the Open Excel node was executed first |