Skip to content

Compare Two Excel Files: dataCompare

The Compare Two Excel Files function allows you to compare the contents of two Excel files by referencing their alias names. This ensures accuracy when validating data between different versions of a file, checking for discrepancies, or verifying report consistency.

Before using this function, both Excel files must be loaded using the Load Excel File and Store Data function. The assigned alias names will then be used in the Compare Two Excel Files function to perform the comparison.

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

Example: Suppose you have two Excel files, Sales_Q1.xlsx and Sales_Q2.xlsx, and you want to compare them to confirm that product pricing remains consistent across quarters.

Steps to Configure:

  1. Load Both Excel Files:
    • Use the Load Excel File and Store Data function to load each Excel file and assign an alias name. For example:
      • File 1 (Sales_Q1.xlsx) → Assign alias name Q1SalesData
      • File 2 (Sales_Q2.xlsx) → Assign alias name Q2SalesData

See Load excel file and store data function for more information.

scrn-compare-excel-load-tabular-view
Tabular View
scrn-compare-excel-load-card-view
Card View

After loading both files, the Case will look like this:

scrn-compare-excel-workflow

  1. Add a new step for Compare Two Excel Files Function.
  2. Select Set a Variable Value from the Action dropdown.
  3. Enter a variable name in the Element Key field (e.g., ComparisonResult). This variable will store the comparison outcome.
  4. Click on Form, choose Functions, and select Compare Two EXCEL Files.
  5. Provide the following parameters:
    • Alias of File 1: Enter the alias name assigned to the first file (e.g., Q1SalesData).
    • Alias of File 2: Enter the alias name assigned to the second file (e.g., Q2SalesData).
  6. Click Save.

Note: While the steps for adding a function are identical in both views, the display of the steps changes:

scrn-compare-excel-tabular-view
Tabular View
scrn-compare-excel-card-view
Card View

Expected Outcome:

  • If the contents of both files match, the ComparisonResult variable will be set to true.
  • If differences are found, the variable will be set to false, indicating discrepancies in the data. (or will it contain the discrepancies)

Back To Top