# MailMergeOptions Interface

> MailMergeOptions interface in the Node.js TypeScript API: Merge policies for missing/null data, output ownership and formula-error handling.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > MailMergeOptions Interface
- **744 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/llms-full.txt

---

Merge policies for missing/null data, output ownership and formula-error handling.

Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Members

#### Properties

| Property | Description |
|---|---|
| [maxRepeatItems](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/maxrepeatitems-property/llms-full.txt) | The maxRepeatItems value of MailMergeOptions. |
| [missing](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/missing-property/llms-full.txt) | The missing value of MailMergeOptions. |
| [nulls](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/nulls-property/llms-full.txt) | The nulls value of MailMergeOptions. |
| [target](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/target-property/llms-full.txt) | The target value of MailMergeOptions. |

### Examples

Use a fresh workbook. Create and format the sample data, apply this API and retain the returned document or result in your application. In the browser pass editor.workbook; in Node.js pass the server control.

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

async function createMailMergeOptionsReport(control: ServerSheetControl) {
    const book = control.workbook;
    const sheet = book.sheets.at(0);
    sheet.cell('A1').setText('October invoice');
    sheet
        .cell('A1')
        .format({
            fontFamily: 'Liberation Sans',
            fontSize: 16,
            bold: true,
            textColor: '#ffffff',
            fillColor: '#163b63',
        });

    sheet.columns.at(0).setWidth({ pixels: 240 });
    book.setMailMerge({
        version: 1,
        bindings: [{ sheetId: sheet.id, cell: 'B3', path: 'customer.name', type: 'string' }],
        repeatBlocks: [],
    });

    const mailMergeSettings: NonNullable<
        Parameters<Awaited<ReturnType<ServerSheetControl['workbook']['createMailMergeTemplate']>>['merge']>[1]
    > = { missing: 'clear' };

    return await book.merge({ customer: { name: 'Alpine Design' } }, mailMergeSettings);
}
```

### See Also

- [TypeScript Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/llms-full.txt)
- [Mail Merge With JSON](https://docs.textcontrol.com/tx-sheet-control/mail-merge/overview/llms-full.txt)

---

## In This Section

- [MailMergeOptions.maxRepeatItems Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/maxrepeatitems-property/llms-full.txt): MailMergeOptions.maxRepeatItems property in the TX Sheet Control TypeScript API for Node.js, with its type number | undefined and a TypeScript example.
- [MailMergeOptions.missing Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/missing-property/llms-full.txt): MailMergeOptions.missing property in the TX Sheet Control TypeScript API for Node.js, with its type "error" | "clear" | undefined and a TypeScript example.
- [MailMergeOptions.nulls Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/nulls-property/llms-full.txt): MailMergeOptions.nulls property in the Node.js TypeScript API, with its type "error" | "clear" | "preserve" | undefined and a TypeScript example.
- [MailMergeOptions.target Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/target-property/llms-full.txt): MailMergeOptions.target property in the TX Sheet Control TypeScript API for Node.js, with its type Workbook | undefined and a TypeScript example.

---

## Nearby

- **Previous:** [MailMergeMetadata.version Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergemetadata/version-property/llms-full.txt)
- **Next:** [MailMergeOptions.maxRepeatItems Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/mailmergeoptions/maxrepeatitems-property/llms-full.txt)
