# Set Path for File

This is a pre-built Action located under the **@Excel Element**. The functionality of this Action in Avo Assure is to set the file path for the Excel sheet, which serves as the initial step for performing Excel operations. The result is stored in a dynamic variable for further use during test execution.

## Syntax

**Input Value**: `<File Path>;<Sheetname in case of excel>(optional)`&#x20;

| Argument                                           | Description                                                                                                                                                                                                                     |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>\<File Path><br>(Required)</p>                  | <p>Provide the file path of the file you want to access.<br>Supported Input file formats:</p><ul><li><strong>.txt</strong></li><li><strong>.xls</strong></li><li><strong>.xlsx</strong></li><li><strong>.csv</strong></li></ul> |
| <p>\<Sheetname in case of excel><br>(optional)</p> | Provide the sheet name you want to select from the Excel file.                                                                                                                                                                  |

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

| Argument                                 | Description                                                       |
| ---------------------------------------- | ----------------------------------------------------------------- |
| <p>\<Dynamic Variable><br>(optional)</p> | This dynamic variable stores the status as **True** or **False.** |

### **Example: Setting the File Path for an Excel Sheet**

In this example, we explain how to set the file path for an Excel sheet and verify whether the path is configured successfully.

* **Action**: Set Path for File
* **Input Value**: C:\User\Documents\StudentList.xlsx;Sheet1
  * The file path (**C:\User\Documents\StudentList.xlsx**) specifies the complete path of the Excel file to be accessed.
  * The sheet name (**Sheet1**) defines the worksheet in the Excel file that Avo Assure works with.
* **Output Value**: {Status}
  * The result of the **Set Path for File** action is stored in this **{Status}** dynamic variable with the following possible values:
    * **True**: If the path is set successfully.
    * **False**: If the path is not set successfully.
* **Logical Explanation**: The **Set Path for File** action takes the value from the **Input Value** column (**C:\User\Documents\StudentList.xlsx;Sheet1**). This action sets the file path to access the specified Excel sheet and stores the result in the **{Status}** variable as true.

<figure><img src="/files/1MvDF6bnMN3B2TSxtbLq" 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/set-path-for-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.
