# createExportStream (@salmonui/data-grid/engine/export-server)

> The createExportStream function of @salmonui/data-grid/engine/export-server: Starts an export: raises onBeforeExport (null when prevented), builds the export model, and returns the file name, MIME type, download headers, and the bytes as an async iterable. Nothing is written until chunks is read.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine-export-server/createExportStream

```ts
import { createExportStream } from '@salmonui/data-grid/engine/export-server';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine-export-server (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine-export-server.md).

## Reference

Kind: function

```ts
function createExportStream<Row>(source: ServerExportSource<Row>, options: ServerExportOptions<Row>, handlers?: ServerExportHandlers<Row>): Promise<ExportStream | null>;
```

Starts an export: raises `onBeforeExport` (null when prevented), builds the
export model, and returns the file name, MIME type, download headers, and
the bytes as an async iterable. Nothing is written until `chunks` is read.
