# Selective Cell by Cell Compare

This pre-built action available under the **@Generic element**, enables Avo Assure to perform a file comparison by selectively checking cells one by one based on the input value. The comparison result is stored in the specified dynamic variable.

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

**Input Value:** `<CSV/Excel file path1>;<Sheet name (optional)>;<Cell selection>;<CSV/Excel file path2>;<Sheet name (optional)>;<Cell selection>;<IgnoreCase (optional)>`

| 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 of the first Excel file (if applicable).<br><em><strong>Note:</strong> This is ignored for CSV files.</em></p>                                       |
| <p>\<Cell selection><br>(Required)</p>          | <p>Specific cell address <br><em>(for example, if the cell is in B column and on 2nd row then cell selection will be B2)</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 of the second Excel file (if applicable).<br><em><strong>Note:</strong> This is ignored for CSV files.</em></p>                                      |
| <p>\<Cell selection><br>(Required)</p>          | <p>Specific cell address <br><em>(for example, if the cell is in B column and on 2nd row then cell selection will be B2)</em></p>                                              |
| <p>\<IgnoreCase> <br>(optional)</p>             | <p>Optional parameter to perform case-insensitive comparison.<br>1. Use the value ignoreCase (case-insensitive )<br>2. If not specified, the comparison is case-sensitive.</p> |

**Output Value:**

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

**Example 1**

**Compare selected cells between Excel and CSV files**

The **Selective Cell by Cell Compare** action compares specified cell ranges between an Excel file and a CSV file (e.g., **C:\Files\Report.xlsx;Sheet1;B5;C:\Files\Report.csv;;B5;IgnoreCase**). This allows focused validation on selected data only, with an optional **IgnoreCase** flag to ignore case differences. 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/LiUIK6aVi0Byrn6KZyPC" alt=""><figcaption></figcaption></figure>

**Example 2**

#### Compare selected cells between two Excel files

The **Selective Cell by Cell Compare** action compares specified cells between two Excel files and sheets (e.g., **C:\Files\Old.xlsx;Data1;A2;C:\Files\New\.xlsx;Data2;A2**). This is useful for verifying changes or consistency within specific sections of large datasets. 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/89ux9EgDHyuXBmY3gK3J" alt=""><figcaption></figcaption></figure>

**Example 3**

#### Compare selected cells between two CSV files

The **Selective Cell by Cell Compare** action compares specified cell ranges in two CSV files (e.g., **C:\Files\Jan.csv;A1;D4;C:\Files\Feb.csv;A1;B2**). This allows direct comparison of specific data segments. 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/YB5jxzlui6DurkERuXTE" 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/selective-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.
