# DataGridOutputApi (@salmonui/data-grid)

> The DataGridOutputApi interface of @salmonui/data-grid.

Canonical: https://salmonui.dev/docs/reference/data-grid/DataGridOutputApi

```ts
import type { DataGridOutputApi } from '@salmonui/data-grid';
```

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

## Reference

Kind: interface

```ts
interface DataGridOutputApi<Row> {
    exportToExcel(options?: DataGridExcelExportOptions<Row>): Promise<ExportFile | null>;
    exportToPdf(options?: DataGridPdfExportOptions<Row>): Promise<ExportFile | null>;
    exportToCsv(options?: DataGridCsvExportOptions<Row>): Promise<ExportFile<string> | null>;
    print(options?: DataGridPrintOptions<Row>): Promise<boolean>;
}
```

Members (4):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `exportToExcel` | `exportToExcel(options?: DataGridExcelExportOptions<Row>): Promise<ExportFile \| null>;` |  | XLSX export (`excelExport`); resolves to the file, or null when prevented. Downloads unless `download: false`. |
| `exportToPdf` | `exportToPdf(options?: DataGridPdfExportOptions<Row>): Promise<ExportFile \| null>;` |  | PDF export (`pdfExport`). |
| `exportToCsv` | `exportToCsv(options?: DataGridCsvExportOptions<Row>): Promise<ExportFile<string> \| null>;` |  | CSV export (`csvExport`); no writer package needed. |
| `print` | `print(options?: DataGridPrintOptions<Row>): Promise<boolean>;` |  | Prints the grid (every row of the scope, no virtualization). Resolves false when prevented or outside a browser. |
