Skip to content

Remove Duplicate Action: removeDuplicate

The removeDuplicate action in the Excel Handler Function is used to identify and remove duplicate entries from a specific column in an Excel sheet. When duplicate entries are found in the mentioned column, the action removes the entire row associated with those duplicates. This ensures that the data in the sheet is unique and free of redundant values.

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

Example: You need to remove duplicate entries from the EmployeeID column in the EmployeeData.xlsx file on sheet number 1, named EmployeeSheet.

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., CleanedData). This variable will store the file path of the updated Excel file.
  4. Click on Form, select Functions, and choose EXCEL Handler Functions from the dropdown.
  5. In the Cmd field, select removeDuplicate and provide the following parameters:
    • FPath: Enter the full path of the Excel file (e.g., C:\Reports\EmployeeData.xlsx).
    • Column Name: Specify the column to check for duplicates (e.g., EmployeeID).
    • Sheet Number: Specify the sheet number in the file (e.g., 1).
    • Sheet Name: Specify the name of the sheet (e.g., EmployeeSheet).
  6. Click Save.
Tabular View
Card View

Outcome on execution:

  • The command scans the EmployeeID column in the specified sheet and removes all duplicate entries. If duplicate entries are found, the entire row of data for each duplicate entry is removed from the sheet.
  • If the operation is successful, it returns true, which is stored in the variable defined in the Element Key field (e.g., CleanedData).
  • If the operation fails (e.g., file not found or sheet inaccessible), it returns false.
  • This variable can be referenced in subsequent steps of the automation process using the syntax ${VariableName} (e.g., ${CleanedData}).

Back To Top