# Write to Cell in File

This is a pre-built Action located under the **@Excel Element**. The functionality of this Action in Avo Assure is to write the content specified in the **Input Value** column into the referenced cell of the Excel sheet. The result of this operation is stored in a dynamic variable for further use during test execution.

## **Syntax**                                         &#x20;

**Input Value**: `<Row>;<Column>;<Value>;<Type>`&#x20;

| Argument                       | Description                                                                                                 |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| <p>\<Row><br>(Required)</p>    | Provide the row number of the Excel file where you want to write the data.                                  |
| <p>\<Column><br>(Required)</p> | Provide the column number of the Excel file where you want to write the data.                               |
| <p>\<Value><br>(Required)</p>  | Provide the actual data you want to write into the specified cell.                                          |
| <p>\<Type><br>(Required)</p>   | Provide the format of the value you want to write, such as **String**, **Number** and **Dynamic Variable**. |

**Output Value**: `<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)`&#x20;

| Argument                                                    | Description                                                       |
| ----------------------------------------------------------- | ----------------------------------------------------------------- |
| \<Dynamic Variable>(Optional);\<Dynamic Variable>(Optional) | Both dynamic variable stores the status as **True** or **False**. |

### Example 1: Writing String Data to a Specific Cell

In this example, we explain how to write string data into a specific cell of an Excel file using the **Write to Cell in File** action.

* **Action**: Write to Cell in File
* **Input Value**: 2;3;IT;string
  * The row number (**2**) specifies the row position in the Excel sheet where the data needs to be written.
  * The column number (**3**) specifies the column position within the same sheet. Combined with the row number, these coordinates identify the exact cell (Row 2, Column 3) in the Excel file where the value IT will be written.
  * The data value  (**IT**) represents the content that will be written into the specified cell.
  * The data type (**string**) indicates that the value written is text based.
* **Output Value**: {Status}
  * The execution status of the action is stored in this **{Status}** variable with the following possible values:
    * **True:** If the data is written successfully.
    * **False**: If the data is not written successfully.
* **Logical Explanation**: The **Write to Cell in File** action takes the value from the **Input value** column **2;3;IT;string** and writes the string **IT** into the specified cell (Row 2, Column 3) in the configured Excel file. The execution status of this operation is stored in the **{Status}** variable as true.

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

### Example 2: Writing Numeric Data to a Specific Cell

In this example, we explain how to write numeric data into a specific cell of an Excel file using the **Write to Cell in File** action.

* **Action**: Write to Cell in File
* **Input Value**: 6;4;6000;Number
  * The row number (**6**) specifies the row position in the Excel sheet where the data needs to be written.
  * The column number (**4**) specifies the column position within the same sheet. Combined with the row number, these coordinates identify the exact cell (Row 6, Column 4) in the Excel file where the value **6000** will be written.
  * The data value (**6000**) represents the numeric content that will be written into the specified cell.
  * The data type (**Number**) indicates that the value being written is numerical.
* **Output Value**: {Status}
  * The execution status of the action is stored in this **{Status}** variable with the following possible values:
    * **True**: If the data is written successfully.
    * **False**: If the data is not written successfully.
* **Logical Explanation**: The **Write to Cell in File** action takes the **Input value** column **6;4;6000;Number** and writes the numeric value **6000** into the specified cell (Row 6, Column 4) in the configured Excel file. The execution status of this operation is stored in the **{Status}** variable as true.

<figure><img src="/files/zSfe2mvUJKP3UQuHwCtY" 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/excel/write-to-cell-in-file.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.
