# EditorUi.loadMergeData Method

> EditorUi.loadMergeData method in the Node.js TypeScript API: Loads the application's mail-merge data source without putting transient data in workbook JSON.

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

---

Loads the application's mail-merge data source without putting transient data in workbook JSON.

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

### Syntax

```typescript
loadMergeData(source: Record<string, unknown> | string | null): MailMergeDataSourceInfo | null
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `source` | `string \| Record<string, unknown> \| null` | No | Object data, JSON text or null to remove the source. |

### Return Value

`MailMergeDataSourceInfo | null`.

A detached source description used by the Reporting controls.

### Examples

Pass an existing EditorUi from the owning document. Related handles and input bytes must belong to the intended document and application; the function applies the operation and inspects its result.

```typescript
function applyEditorUiLoadMergeData(
    editorUi: { loadMergeData(argument0: null | string | Record<string, unknown>): unknown },
    source: null | string | Record<string, unknown>,
) {
    const result = editorUi['loadMergeData'](source);
    console.log(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

- [EditorUi Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/editorui/llms-full.txt)
- [Mail Merge With JSON](https://docs.textcontrol.com/tx-sheet-control/mail-merge/overview/llms-full.txt)
- [MailMergeDataSourceInfo Interface](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergedatasourceinfo/llms-full.txt)

---

## Nearby

- **Previous:** [EditorUi.language Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/editorui/language-property/llms-full.txt)
- **Next:** [EditorUi.printContext Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/editorui/printcontext-property/llms-full.txt)
