# SheetCollection.remove Method

> SheetCollection.remove method in the TX Sheet Control TypeScript API for Node.js: Remove a sheet handle or ID; retain at least one sheet.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > SheetCollection > SheetCollection.remove Method
- **413 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/sheetcollection/remove-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/sheetcollection/remove-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/sheetcollection/remove-method/llms-full.txt

---

Remove a sheet handle or ID; retain at least one sheet.

Owner: [SheetCollection](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/sheetcollection/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

### Syntax

```typescript
remove(sheet: Worksheet | string): void
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `sheet` | `string \| Worksheet` | No | Operation-specific input; see the owning type for units and scope. |

### Return Value

`void`.

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

```typescript
import type { ServerSheetControl } from '@txtextcontrol/tx-sheet-control-server';

function removeScratchSheet(control: ServerSheetControl) {
    const book = control.workbook;
    const scratch = book.sheets.add('Scratch');
    book.sheets.remove(scratch);
}
```

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

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

---

## Nearby

- **Previous:** [SheetCollection.getById Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/sheetcollection/getbyid-method/llms-full.txt)
- **Next:** [SheetCollection.workbook Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/sheetcollection/workbook-property/llms-full.txt)
