# Cell by Cell Compare

This is pre-built Action located under the **@Generic Element,** instructs the Avo Assure to compare file by checking cell by cell and save the result in the given dynamic variable.

{% hint style="warning" %}
**Note:** It can compare pair of Excel files OR CSV files OR an Excel and a CSV file.
{% endhint %}

### **Syntax**

**Input Value:** `<CSV/Excel file path1>;<Sheet name(optional)>;<CSV/Excel file  path2>;<Sheet name(optional)>`&#x20;

| Argument                                        | Description                                                                                                                               |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<csv/Excel file path1></p><p>(Required)</p> | Provide the path to the first file (source or reference), which can be in .csv, .xls, or .xlsx format.                                    |
| <p>\<Sheet name><br>(Optional)</p>              | <p>Specify the sheet name in the first Excel file (if applicable).<br><em><strong>Note:</strong> This is ignored for CSV files.</em></p>  |
| <p>\<csv/Excel file path2><br>(Optional)</p>    | Provide the path to the second file (target/actual file to compare), which can be in .csv, .xls, or .xlsx format.                         |
| <p>\<Sheet name><br>(Optional)</p>              | <p>Specify the sheet name in the second Excel file (if applicable).<br><em><strong>Note:</strong> This is ignored for CSV files.</em></p> |

**Output Value:**&#x20;

| Argument                                                    | Description                                              |
| ----------------------------------------------------------- | -------------------------------------------------------- |
| \<Dynamic Variable>(Optional);\<Dynamic Variable>(Optional) | This variable stores the status as **true** or **false** |

**Example 1**

**Compare an Excel file and a CSV file**

The **Cell by Cell Compare** action performs a comparison between an Excel file and a CSV file (e.g., **C:\Files\Report.xlsx;Sheet1;C:\Files\Report.csv**). This allows validation of content between formats for consistency. The result of the comparison is stored in the **{Comparison Result}** variable, with the following possible values:

* **True** –  if the comparison is completed successfully
* **False** – if the comparison is not completed

<figure><img src="/files/GMT6eZSDrISVCOgSmzw2" alt=""><figcaption></figcaption></figure>

**Example 2**

#### Compare two Excel files with sheet names

The **Cell by Cell Compare** action performs a comparison between two Excel files with specified sheet names (e.g., **C:\Files\OldData.xlsx;SheetA;C:\Files\NewData.xlsx;SheetB**). This helps verify whether data across sheets has changed or remained consistent. The result of the comparison is stored in the {Comparison Result} variable, with the following possible values:

* **True** –  if the comparison is completed successfully
* **False** – if the comparison is not completed

<figure><img src="/files/y04W0oMiUcaFCjYnNIED" alt=""><figcaption></figcaption></figure>

**Example 3**

#### Compare two CSV files

The **Cell by Cell Compare** action performs a comparison between two CSV files (e.g., **C:\Files\Jan\_Sales.csv;C:\Files\Feb\_Sales.csv**). The result of the comparison is stored in the {Comparison Result} variable,  with the following possible values:

* **True** –  if the comparison is completed successfully
* **False** – if the comparison is not completed

<figure><img src="/files/Q5xJRhBNru4hDOdWzVoP" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.avoautomation.com/avo-assure/actions/generic/file-and-folder-operations/cell-by-cell-compare.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
