Skip to content

Remove Column Data Action: removeColumnData

The removeColumnData command removes a specific column from a given sheet in an Excel file. This function is useful for cleaning up unnecessary or irrelevant data in your spreadsheets.

Note: Ensure that the file being used is not open during the Case execution to avoid errors or conflicts.

Example: You have an Excel file named salesData.xlsx and need to remove the column named Discount from the sheet named Q4Sales.

Steps to Configure

  1. Add a new step.
  2. Select SET from the Action dropdown.
  3. Enter a variable name in the Element Key field (e.g., ColumnRemovalStatus). This variable will store the operation result (e.g., success or failure).
  4. Click on Form, select Functions, and choose EXCEL Handler Functions from the dropdown.
  5. In the action field, select removeColumnData and provide the following parameters:
    • fPath: Specify the path to the Excel file (e.g., C:\Data\salesData.xlsx).
    • columnName: Enter the name of the column to be removed (e.g., Discount).
    • sheet: Enter the name or number of the sheet from which the column will be removed (e.g., Q4Sales).
  6. Click Save.
v7_excel_file_op_removeColumnData_list_view
List View
v7_excel_file_op_removeColumnData_grid_view
Grid View

Outcome on Execution:

  • The command removes the Discount column from the sheet Q4Sales in the specified Excel file.
  • If the column is successfully removed, the command returns true in the variable defined in the Element Key (e.g., ColumnRemovalStatus).
  • If the operation fails (e.g., column not found, sheet unavailable, or permission denied), it returns false.
  • This variable can be referenced in later steps of your automation process using the syntax ${VariableName} (e.g., ${ColumnRemovalStatus}).

Last updated: Oct 7, 2025
Back To Top