# Range.fillTo Method

> Range.fillTo method in the TX Sheet Control JavaScript API for the browser, with the return type Range and a JavaScript example.

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

---

The fillTo operation of Range.

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

### Syntax

```javascript
owner.fillTo(destination, options)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `destination` | `string` | No | Value matching destination's declared type and the owning object's validation rules. |
| `options` | `FillOptions \| undefined` | Yes | Supported settings for this operation; omitted settings retain documented defaults. |

### Return Value

`Range`.

### 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 applyRangeFillTo(book) {
    book.sheets
        .at(0)
        .range('B8:B9')
        .setValues([[120], [80]]);

    const range = book.sheets.at(0).range('B8:B9');
    const result = range.fillTo('B8:B12', { mode: 'copy' });
    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

- [Range Class](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/range/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)
- [FillOptions Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/filloptions/llms-full.txt)

---

## Nearby

- **Previous:** [Range.copyTo Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/range/copyto-method/llms-full.txt)
- **Next:** [Range.format Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/range/format-method/llms-full.txt)
