# ServerSheetControl.batch Method

> ServerSheetControl.batch method in the TX Sheet Control JavaScript API for Node.js: Apply serializable compatibility commands atomically.

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

---

Apply serializable compatibility commands atomically.

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

### Syntax

```javascript
owner.batch(commands)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `commands` | `readonly WorkbookCommand[]` | No | 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.

```javascript
function demonstrateServerSheetControlBatch(control) {
    const book = control.workbook;
    control.batch([
        { method: 'setCell', args: ['B8', 120] },
        { method: 'setCell', args: ['B9', 80] },
        { method: 'setCell', args: ['B10', '=SUM(B8:B9)'] },
    ]);

    console.log(book.sheets.at(0).cell('B10').value);
}
```

### 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/javascript-api/nodejs/serversheetcontrol/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)
- [WorkbookCommand Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/workbookcommand/llms-full.txt)

---

## Nearby

- **Previous:** [ServerSheetControl Class](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/llms-full.txt)
- **Next:** [ServerSheetControl.destroy Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/destroy-method/llms-full.txt)
