# Worksheet.range Method

> Worksheet.range method in the TX Sheet Control JavaScript API for the browser: Create an A1 range handle. Includes the syntax and a JavaScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > JavaScript API > Browser Editor > Worksheet > Worksheet.range Method
- **397 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/worksheet/range-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/worksheet/range-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/worksheet/range-method/llms-full.txt

---

Create an A1 range handle.

Owner: [Worksheet](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/worksheet/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

### Syntax

```javascript
owner.range(ref)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `ref` | `string` | No | A1 address or zero-based coordinates. |

### Return Value

`Range`.

A detached result or a handle bound to the same worksheet.

### Exceptions

| Exception | Condition |
|---|---|
| `RangeError` | The address, scope or handle is invalid or stale. |

### Examples

Use a fresh sample workbook for this example. In the browser pass editor.workbook; in Node.js pass the server control. Document-bound objects are obtained from that same owner.

```javascript
function applyWorksheetRange(book) {
    const worksheet = book.sheets.at(0);
    const result = worksheet.range('B8');
    return result;
}
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [Worksheet Class](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/worksheet/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)
- [Range Class](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/range/llms-full.txt)

---

## Nearby

- **Previous:** [Worksheet.protection Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/worksheet/protection-property/llms-full.txt)
- **Next:** [Worksheet.remove Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/worksheet/remove-method/llms-full.txt)
