Skip to content

Remove Column Data Action: removeColumnData

The removeColumnData action 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 a Variable Value 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 Cmd 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.
Tabular View
Card View

Outcome on Execution:

  • The action removes the Discount column from the sheet Q4Sales in the specified Excel file.
  • If the column is successfully removed, the action 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}).

Back To Top