# Worksheets

### Overview

This procedure gets a worksheet from an Excel file, provided the worksheet's name.

### Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

<details>

<summary><code>get the excel's worksheet where</code></summary>

#### What does it do?

References an Excel file for the system to retrieve a worksheet from.

#### Where does it go?

This phrase should be written on a **new line**.

#### Is it required?

✅ Yes — This phrase is **required**.

#### Does it require data?

✅ Yes — A reference to **the excel** must be previously defined in the automation.

</details>

<details>

<summary><code>the worksheet name is "worksheet-name"</code></summary>

#### What does it do?

Specifies the name of the worksheet to retrieve.

#### Where does it go?

Indented under `get the excel's worksheet where`.

#### Is it required?

✅ Yes — This phrase is **required**.

#### Does it require data?

✅ Yes — Replace **worksheet-name** with the name of the worksheet to retrieve. If not specified, a question will be raised prompting to provide the worksheet name.

#### Example

```
the worksheet name is "Sheet1"
```

</details>

### Examples

#### 1. Get the Worksheet

```
get the excel's worksheet
```

#### 2. Get the Worksheet with a Specific Sheet Name

```
get the excel's worksheet where
    the worksheet name is "Summary"
```


---

# 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.kognitos.com/legacy/legacy-experience/automation-areas/excel-v2/get-a-worksheet.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.
