# Worksheet.duplicate Method

> Worksheet.duplicate method in the Node.js TypeScript API: Duplicates this worksheet with distinct table identities/names, preserving cells and formatting.

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

---

Duplicates this worksheet with distinct table identities/names, preserving cells and formatting.

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

### Syntax

```typescript
duplicate(name?: string): Worksheet
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `name` | `string \| undefined` | Yes | Name validated in the owning collection or document scope. |

### Return Value

`Worksheet`.

### 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 applyWorksheetDuplicate(control: ServerSheetControl) {
    const book = control.workbook;
    const worksheet = book.sheets.at(0);

    const result = worksheet.duplicate();
    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/typescript-api/nodejs/worksheet/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## Nearby

- **Previous:** [Worksheet.drawings Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/worksheet/drawings-property/llms-full.txt)
- **Next:** [Worksheet.getSparklineGroups Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/worksheet/getsparklinegroups-method/llms-full.txt)
