# ServerSheetControl.invokeWorkbook Method

> ServerSheetControl.invokeWorkbook method in the TX Sheet Control TypeScript API for Node.js: Invoke an allowlisted document operation by name.

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

---

Invoke an allowlisted document operation by name.

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

### Syntax

```typescript
invokeWorkbook(method: string, args?: unknown[]): unknown
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `method` | `string` | No | Operation-specific input; see the owning type for units and scope. |
| `args` | `unknown[] \| undefined` | Yes | Operation-specific input; see the owning type for units and scope. |

### Return Value

`unknown`.

A detached result or a handle bound to the same 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 inspectWorksheetNames(control: ServerSheetControl) {
    const book = control.workbook;
    const sheets = control.invokeWorkbook('listSheets');
    console.log(sheets);
}
```

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

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

---

## Nearby

- **Previous:** [ServerSheetControl.getXlsxWarnings Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/serversheetcontrol/getxlsxwarnings-method/llms-full.txt)
- **Next:** [ServerSheetControl.licenseInfo Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/serversheetcontrol/licenseinfo-property/llms-full.txt)
