# Rows

### Overview

This procedure locates and retrieves a row in an Excel worksheet that contains a specific value. A column or a row number can be specified to identify the row.

### Syntax

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

<details>

<summary><code>get the worksheet's row</code></summary>

#### What does it do?

Begins row retrieval from the current worksheet.

#### 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 worksheet** must be defined in the automation.

</details>

<details>

<summary><code>the row number is x</code></summary>

#### What does it do?

Specifies which row to retrieve by number.

#### Where does it go?

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

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **x** with a row number (1-based).

#### Example

```
the row number is 5
```

</details>

<details>

<summary><code>the column label is "A"</code></summary>

#### What does it do?

Specifies which column to search for the cell value.

#### Where does it go?

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

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **A** with a column label (e.g., "A", "B", "AB"). Must be used with cell value.

#### Example

```
the column label is "A"
```

</details>

<details>

<summary><code>the cell value is "search-value"</code></summary>

#### What does it do?

Specifies the value to search for in the specified column.

#### Where does it go?

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

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **search-value** with the value to find. Must be used with column label.

#### Example

```
the cell value is "Total"
```

</details>

### Examples

#### 1. Get a Row by Specifying a Row Number

```
get the worksheet's row
    the row number is 23
```

#### 2. Get a Row by Specifying a Column Label and Cell Value

```
get the worksheet's row
    the column label is "AB"
    the cell value is "Total:"
```


---

# 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-row.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.
