---
title: "CSV Export"
framework: javascript
version: "36.1.0"
---

# CSV Export

The grid data can be exported to CSV with an API call, or using the right-click context menu (Enterprise only) on the Grid.

## What Gets Exported

The same data that is in the grid gets exported, with some of the GUI representation of the data. What this means is:

- The raw values, and not the result of cell renderer will get used, meaning:
  - Value Getters will be used.
  - Cell Renderers will **NOT** be used.
  - Cell Formatters will be used by default via the [Use Value Formatter for Export](https://www.ag-grid.com/javascript-data-grid/value-formatters/#formatting-for-export) feature.
- Cell styles are not exported.
- If row grouping:
  - All data will be exported regardless of whether groups are open in the UI.
  - By default, group names will be in the format "-> Parent Name -> Child Name" (use `processRowGroupCallback` to change this).

> **Note**
>
> The CSV export will be enabled by default. If you want to disable it, you can set the property `suppressCsvExport = true` in your gridOptions.

## Security Concerns

When opening CSV files, spreadsheet applications like Excel, Apple Numbers, Google Sheets and others will automatically execute cell values that start with the following symbols as formulas: `+`, `-`, `=`, `@`, `Tab (0x09)` and `Carriage Return (0x0D)`. In order to prevent any malicious content from being exported we recommend using the `callback` methods shown in the [CSV Export Params](https://www.ag-grid.com/javascript-data-grid/csv-export/#csvexportparams) to modify the exported cell values so that they do NOT start with any of the characters listed above. This way the applications will not execute the cell value directly if it starts with the characters listed above. If you'd like to keep the cell values unchanged when exporting, please allow exporting to Excel only.

> **Note**
>
> Detailed info regarding CSV Injection can be found in the [OWASP CSV Injection](https://owasp.org/www-community/attacks/CSV_Injection) website.

## Standard Export

The example below shows the default behaviour when exporting the grid's data to CSV.

Note the following:

- You can use the `Show CSV export content text` button, to preview the output.
- You can use the `Download CSV export file` button to download a csv file.
- The file will be exported using the default name: `export.csv`.
- Community version supports api CSV Export but not Context Menu.

#### CSV Export

```ts
import {
  ClientSideRowModelModule,
  CsvExportModule,
  GridApi,
  GridOptions,
  ModuleRegistry,
  NumberEditorModule,
  TextEditorModule,
  createGrid,
  enableDevValidations,
} from "ag-grid-community";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  CsvExportModule,
  NumberEditorModule,
  TextEditorModule,
]);

let gridApi: GridApi;

const gridOptions: GridOptions = {
  defaultColDef: {
    editable: true,
    minWidth: 100,
    flex: 1,
  },

  suppressExcelExport: true,
  popupParent: document.body,

  columnDefs: [{ field: "make" }, { field: "model" }, { field: "price" }],

  rowData: [
    { make: "Toyota", model: "Celica", price: 35000 },
    { make: "Ford", model: "Mondeo", price: 32000 },
    { make: "Porsche", model: "Boxster", price: 72000 },
  ],
};

function onBtnExport() {
  gridApi!.exportDataAsCsv();
}

function onBtnUpdate() {
  (document.querySelector("#csvResult") as any).value = gridApi!.getDataAsCsv();
}

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

if (typeof window !== "undefined") {
  // Attach external event handlers to window so they can be called from index.html
  (<any>window).onBtnExport = onBtnExport;
  (<any>window).onBtnUpdate = onBtnUpdate;
}
```

[Live example: CSV Export](https://www.ag-grid.com/examples/csv-export/csv-export/typescript)

## Changing the column separator

By default, a CSV file separates its columns using `,`. But this value `token` could be changed using the `columnSeparator` param.

Note the following:

- You can use the select field at the top to switch the value of the `columnSeparator` param.
- You can use the `Show CSV export content text` button, to preview the output.
- Enterprise version enables CSV Export using right click via the Context Menu.

#### CSV Export - Column Separator

```ts
import {
  ClientSideRowModelModule,
  CsvExportModule,
  GridApi,
  GridOptions,
  ModuleRegistry,
  NumberEditorModule,
  TextEditorModule,
  createGrid,
  enableDevValidations,
} from "ag-grid-community";
import { ColumnMenuModule, ContextMenuModule } from "ag-grid-enterprise";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  CsvExportModule,
  ColumnMenuModule,
  ContextMenuModule,
  NumberEditorModule,
  TextEditorModule,
]);

let gridApi: GridApi;

const gridOptions: GridOptions = {
  defaultColDef: {
    editable: true,
    minWidth: 100,
    flex: 1,
  },

  suppressExcelExport: true,
  popupParent: document.body,

  columnDefs: [{ field: "make" }, { field: "model" }, { field: "price" }],

  rowData: [
    { make: "Toyota", model: "Celica", price: 35000 },
    { make: "Ford", model: "Mondeo", price: 32000 },
    { make: "Porsche", model: "Boxster", price: 72000 },
  ],
};

function getValue(inputSelector: string) {
  const text = (document.querySelector(inputSelector) as any).value;
  switch (text) {
    case "none":
      return;
    case "tab":
      return "\t";
    default:
      return text;
  }
}

function getParams() {
  return {
    columnSeparator: getValue("#columnSeparator"),
  };
}

function onBtnExport() {
  const params = getParams();
  if (params.columnSeparator) {
    console.log(
      "NOTE: you are downloading a file with non-standard separators - it may not render correctly in Excel.",
    );
  }
  gridApi!.exportDataAsCsv(params);
}

function onBtnUpdate() {
  (document.querySelector("#csvResult") as any).value =
    gridApi!.getDataAsCsv(getParams());
}

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

if (typeof window !== "undefined") {
  // Attach external event handlers to window so they can be called from index.html
  (<any>window).onBtnExport = onBtnExport;
  (<any>window).onBtnUpdate = onBtnUpdate;
}
```

[Live example: CSV Export - Column Separator](https://www.ag-grid.com/examples/csv-export/csv-export-column-separator/typescript)

## Suppress Quotes

By default cell values are encoded according to CSV format rules: values are wrapped in double quotes, and any double quotes within the values are escaped, so `my"value` becomes `"my""value"`. Pass true to insert the value into the CSV file without escaping. In this case it is your responsibility to ensure that no cells contain the columnSeparator character.

Note the following:

- You can use the select field at the top to switch the value of the `suppressQuotes` param.
- You can edit the cells to preview the results with different inputs.
- You can use the `Show CSV export content text` button, to preview the output.
- You can use the `Download CSV export file` button to download a csv file.

#### CSV Export - Suppress Quotes

```ts
import {
  ClientSideRowModelModule,
  CsvExportModule,
  GridApi,
  GridOptions,
  ModuleRegistry,
  NumberEditorModule,
  TextEditorModule,
  createGrid,
  enableDevValidations,
} from "ag-grid-community";
import { ColumnMenuModule, ContextMenuModule } from "ag-grid-enterprise";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  CsvExportModule,
  ColumnMenuModule,
  ContextMenuModule,
  NumberEditorModule,
  TextEditorModule,
]);

let gridApi: GridApi;

const gridOptions: GridOptions = {
  defaultColDef: {
    editable: true,
    minWidth: 100,
    flex: 1,
  },

  suppressExcelExport: true,
  popupParent: document.body,

  columnDefs: [{ field: "make" }, { field: "model" }, { field: "price" }],

  rowData: [
    { make: "Toyota", model: "Celica", price: 35000 },
    { make: "Ford", model: "Mondeo", price: 32000 },
    { make: "Porsche", model: "Boxster", price: 72000 },
  ],
};

function getBoolean(inputSelector: string) {
  return !!(document.querySelector(inputSelector) as HTMLInputElement).checked;
}

function getParams() {
  return {
    suppressQuotes: getBoolean("#suppressQuotes"),
  };
}

function onBtnExport() {
  const params = getParams();
  if (params.suppressQuotes) {
    console.log(
      "NOTE: you are downloading a file with non-standard quotes - it may not render correctly in Excel.",
    );
  }
  gridApi!.exportDataAsCsv(params);
}

function onBtnUpdate() {
  (document.querySelector("#csvResult") as any).value =
    gridApi!.getDataAsCsv(getParams());
}

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

if (typeof window !== "undefined") {
  // Attach external event handlers to window so they can be called from index.html
  (<any>window).onBtnExport = onBtnExport;
  (<any>window).onBtnUpdate = onBtnUpdate;
}
```

[Live example: CSV Export - Suppress Quotes](https://www.ag-grid.com/examples/csv-export/csv-export-suppress-quotes/typescript)

## Prepending and Appending Content

The recommended way to prepend or append content, is by passing an array of CsvCell objects to `appendContent` or `prependContent`. This ensures that your content is correctly escaped.

For compatibility with earlier versions of the Grid you can also pass a string, which will be inserted into the CSV file without any processing. You are responsible for formatting the string according to the CSV standard.

Note the following:

- You can use select fields at the top to switch the value of `prependContent` and `appendContent`.
  - With `prependContent=CsvCell[][]` or `appendContent=CsvCell[][]`, custom content will be inserted containing commas and quotes. These commas and quotes will be visible when opened in Excel because they have been escaped properly.
  - With `prependContent=string` or `appendContent=string`, a string to be inserted into the CSV file without any processing, and without being affected by suppressQuotes and columnSeparator. It contains commas and quotes that will not be visible in Excel.
- You can use the `Show CSV export content text` button, to preview the output.
- You can use the `Download CSV export file` button to download a csv file.

#### CSV Export - Custom Header and Footer

```ts
import {
  ClientSideRowModelModule,
  CsvExportModule,
  GridApi,
  GridOptions,
  ModuleRegistry,
  NumberEditorModule,
  TextEditorModule,
  createGrid,
  enableDevValidations,
} from "ag-grid-community";
import { ColumnMenuModule, ContextMenuModule } from "ag-grid-enterprise";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  CsvExportModule,
  ColumnMenuModule,
  ContextMenuModule,
  NumberEditorModule,
  TextEditorModule,
]);

let gridApi: GridApi;

const gridOptions: GridOptions = {
  defaultColDef: {
    editable: true,
    minWidth: 100,
    flex: 1,
  },

  suppressExcelExport: true,
  popupParent: document.body,

  columnDefs: [{ field: "make" }, { field: "model" }, { field: "price" }],

  rowData: [
    { make: "Toyota", model: "Celica", price: 35000 },
    { make: "Ford", model: "Mondeo", price: 32000 },
    { make: "Porsche", model: "Boxster", price: 72000 },
  ],
};

function getValue(inputSelector: string) {
  const text = (document.querySelector(inputSelector) as HTMLInputElement)
    .value;
  switch (text) {
    case "string":
      return (
        'Here is a comma, and a some "quotes". You can see them using the\n' +
        "api.getDataAsCsv() button but they will not be visible when the downloaded\n" +
        "CSV file is opened in Excel because string content passed to\n" +
        "prependContent and appendContent is not escaped."
      );
    case "array":
      return [
        [],
        [
          {
            data: {
              value: 'Here is a comma, and a some "quotes".',
              type: "String",
            },
          },
        ],
        [
          {
            data: {
              value:
                "They are visible when the downloaded CSV file is opened in Excel because custom content is properly escaped (provided that suppressQuotes is not set to true)",
              type: "String",
            },
          },
        ],
        [
          { data: { value: "this cell:", type: "String" }, mergeAcross: 1 },
          {
            data: {
              value: "is empty because the first cell has mergeAcross=1",
              type: "String",
            },
          },
        ],
        [],
      ];
    case "none":
      return;
    default:
      return text;
  }
}

function getParams() {
  return {
    prependContent: getValue("#prependContent"),
    appendContent: getValue("#appendContent"),
    suppressQuotes: undefined,
    columnSeparator: undefined,
  };
}

function onBtnExport() {
  const params = getParams();
  gridApi!.exportDataAsCsv(params);
}

function onBtnUpdate() {
  (document.querySelector("#csvResult") as any).value =
    gridApi!.getDataAsCsv(getParams());
}

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

if (typeof window !== "undefined") {
  // Attach external event handlers to window so they can be called from index.html
  (<any>window).onBtnExport = onBtnExport;
  (<any>window).onBtnUpdate = onBtnUpdate;
}
```

[Live example: CSV Export - Custom Header and Footer](https://www.ag-grid.com/examples/csv-export/csv-export-header-footer/typescript)

## Column Headers

In some situations, you could be interested in exporting only the grid data, without exporting the header cells. For this scenario, we provide the `skipColumnGroupHeaders=true` and `skipColumnHeaders=true` params.

Note the following:

- Initially, grouped headers and header are exported.
- Group Headers will be skipped if `Skip Column Group Headers` is checked.
- Normal headers will be skipped if `Skip Column Headers` is checked.

#### CSV Export - Column Headers

```ts
import {
  ClientSideRowModelModule,
  CsvExportModule,
  GridApi,
  GridOptions,
  GridReadyEvent,
  ModuleRegistry,
  NumberEditorModule,
  TextEditorModule,
  createGrid,
  enableDevValidations,
} from "ag-grid-community";
import { ColumnMenuModule, ContextMenuModule } from "ag-grid-enterprise";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  CsvExportModule,
  ColumnMenuModule,
  ContextMenuModule,
  NumberEditorModule,
  TextEditorModule,
]);

let gridApi: GridApi;

const gridOptions: GridOptions = {
  defaultColDef: {
    editable: true,
    minWidth: 100,
    flex: 1,
  },

  suppressExcelExport: true,
  popupParent: document.body,

  columnDefs: [
    { headerName: "Brand", children: [{ field: "make" }, { field: "model" }] },
    {
      headerName: "Value",
      children: [{ field: "price" }],
    },
  ],

  rowData: [
    { make: "Toyota", model: "Celica", price: 35000 },
    { make: "Ford", model: "Mondeo", price: 32000 },
    { make: "Porsche", model: "Boxster", price: 72000 },
  ],

  onGridReady: (params: GridReadyEvent) => {
    (document.getElementById("columnGroups") as HTMLInputElement).checked =
      true;
  },
};

function getBoolean(id: string) {
  const field = document.querySelector("#" + id) as HTMLInputElement;

  return !!field.checked;
}

function getParams() {
  return {
    skipColumnGroupHeaders: getBoolean("columnGroups"),
    skipColumnHeaders: getBoolean("skipHeader"),
  };
}

function onBtnExport() {
  gridApi!.exportDataAsCsv(getParams());
}

function onBtnUpdate() {
  (document.querySelector("#csvResult") as any).value =
    gridApi!.getDataAsCsv(getParams());
}

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

if (typeof window !== "undefined") {
  // Attach external event handlers to window so they can be called from index.html
  (<any>window).onBtnExport = onBtnExport;
  (<any>window).onBtnUpdate = onBtnUpdate;
}
```

[Live example: CSV Export - Column Headers](https://www.ag-grid.com/examples/csv-export/csv-export-column-headers/typescript)

## Pinned Rows

If the pinned rows are not relevant to the data, they can be excluded from the export by using the `skipPinnedTop=true` and `skipPinnedBottom=true` params.

Manually pinned rows also remain in the exported body by default. Set `skipPinnedRowDuplicates=true` to omit those body copies while retaining the rows in their pinned sections.

Note the following:

- By default, all pinned rows are exported.
- If `Skip Pinned Top Rows` is checked, the rows pinned at the top will be skipped.
- If `Skip Pinned Bottom Rows` is checked, the rows pinned at the bottom will be skipped.

#### CSV Export - Pinned Rows

```ts
import {
  ClientSideRowModelModule,
  CsvExportModule,
  GridApi,
  GridOptions,
  ModuleRegistry,
  NumberEditorModule,
  PinnedRowModule,
  TextEditorModule,
  createGrid,
  enableDevValidations,
} from "ag-grid-community";
import { ColumnMenuModule, ContextMenuModule } from "ag-grid-enterprise";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  CsvExportModule,
  ColumnMenuModule,
  ContextMenuModule,
  PinnedRowModule,
  NumberEditorModule,
  TextEditorModule,
]);

let gridApi: GridApi;

const gridOptions: GridOptions = {
  defaultColDef: {
    editable: true,
    minWidth: 100,
    flex: 1,
  },

  suppressExcelExport: true,
  popupParent: document.body,

  columnDefs: [{ field: "make" }, { field: "model" }, { field: "price" }],

  pinnedTopRowData: [{ make: "Top Make", model: "Top Model", price: 0 }],

  pinnedBottomRowData: [
    { make: "Bottom Make", model: "Bottom Model", price: 10101010 },
  ],

  rowData: [
    { make: "Toyota", model: "Celica", price: 35000 },
    { make: "Ford", model: "Mondeo", price: 32000 },
    { make: "Porsche", model: "Boxster", price: 72000 },
  ],
};

function getBoolean(id: string) {
  const field: any = document.querySelector("#" + id);

  return !!field.checked;
}

function getParams() {
  return {
    skipPinnedTop: getBoolean("skipPinnedTop"),
    skipPinnedBottom: getBoolean("skipPinnedBottom"),
  };
}

function onBtnExport() {
  gridApi!.exportDataAsCsv(getParams());
}

function onBtnUpdate() {
  (document.querySelector("#csvResult") as any).value =
    gridApi!.getDataAsCsv(getParams());
}

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

if (typeof window !== "undefined") {
  // Attach external event handlers to window so they can be called from index.html
  (<any>window).onBtnExport = onBtnExport;
  (<any>window).onBtnUpdate = onBtnUpdate;
}
```

[Live example: CSV Export - Pinned Rows](https://www.ag-grid.com/examples/csv-export/csv-export-pinned-rows/typescript)

## Hidden Columns

By default, hidden columns are not exported. If you would like all columns to be exported regardless of the current state of grid, use the `allColumns=true` params.

Note the following:

- By default, only visible columns will be exported. The bronze, silver, and gold columns will not.
- If `Export All Columns` is checked, the bronze, silver, and gold columns will be included in the export.

#### CSV Export - Hidden Columns

```ts
import {
  ClientSideRowModelModule,
  CsvExportModule,
  GridApi,
  GridOptions,
  ModuleRegistry,
  NumberEditorModule,
  TextEditorModule,
  createGrid,
  enableDevValidations,
} from "ag-grid-community";
import { ColumnMenuModule, ContextMenuModule } from "ag-grid-enterprise";
import { getData } from "./data";

// Enable extended validations only for development
if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

ModuleRegistry.registerModules([
  ClientSideRowModelModule,
  CsvExportModule,
  ColumnMenuModule,
  ContextMenuModule,
  NumberEditorModule,
  TextEditorModule,
]);

let gridApi: GridApi;

const gridOptions: GridOptions = {
  defaultColDef: {
    editable: true,
    minWidth: 100,
    flex: 1,
  },

  suppressExcelExport: true,
  popupParent: document.body,

  columnDefs: [
    { field: "athlete" },
    { field: "country" },
    { field: "sport" },
    { field: "gold", hide: true },
    { field: "silver", hide: true },
    { field: "bronze", hide: true },
    { field: "total" },
  ],

  rowData: getData(),
};

function getBoolean(id: string) {
  const field: any = document.querySelector("#" + id);

  return !!field.checked;
}

function getParams() {
  return {
    allColumns: getBoolean("allColumns"),
  };
}

function onBtnExport() {
  gridApi!.exportDataAsCsv(getParams());
}

function onBtnUpdate() {
  (document.querySelector("#csvResult") as any).value =
    gridApi!.getDataAsCsv(getParams());
}

const gridDiv = document.querySelector<HTMLElement>("#myGrid")!;
gridApi = createGrid(gridDiv, gridOptions);

if (typeof window !== "undefined") {
  // Attach external event handlers to window so they can be called from index.html
  (<any>window).onBtnExport = onBtnExport;
  (<any>window).onBtnUpdate = onBtnUpdate;
}
```

[Live example: CSV Export - Hidden Columns](https://www.ag-grid.com/examples/csv-export/csv-export-hidden-columns/typescript)

## API

### Grid Properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `defaultCsvExportParams` | [`CsvExportParams`](https://www.ag-grid.com/javascript-data-grid/csv-export/#csvexportparams) |  |  | A default configuration object used to export to CSV. Module: [`CsvExportModule`](https://www.ag-grid.com/javascript-data-grid/modules/). |
| `suppressCsvExport` | `boolean` |  | `false` | Prevents the user from exporting the grid to CSV. |

### API Methods

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `exportDataAsCsv` | `Function` |  |  | Downloads a CSV export of the grid's data. Module: [`CsvExportModule`](https://www.ag-grid.com/javascript-data-grid/modules/). |
| `getDataAsCsv` | `Function` |  |  | Similar to `exportDataAsCsv`, except returns the result as a string rather than download it. Module: [`CsvExportModule`](https://www.ag-grid.com/javascript-data-grid/modules/). |

## Interfaces

### CsvExportParams

Properties available on the `CsvExportParams` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `columnSeparator` | `string` |  | `,` | Delimiter to insert between cell values. |
| `suppressQuotes` | `boolean` |  | `false` | By default cell values are encoded according to CSV format rules: values are wrapped in double quotes, and any double quotes within the values are escaped, so my value becomes \"my\"\"value\". Pass `true` to insert the value into the CSV file without escaping. In this case it is your responsibility to ensure that no cells contain the columnSeparator character. |
| `prependContent` | `CsvCustomContent` |  |  | Content to put at the top of the file export. A 2D array of CsvCell objects (see [Prepending and Appending Content](#prepending-and-appending-content)). Alternatively, you can pass a multi-line string that is simply appended to the top of the file content. |
| `appendContent` | `CsvCustomContent` |  |  | Content to put at the bottom of the file export. A 2D array of CsvCell objects (see [Prepending and Appending Content](#prepending-and-appending-content)). Alternatively, you can pass a multi-line string that is simply appended to the bottom of the file content. |
| `getCustomContentBelowRow` | `Function` |  |  | A callback function to return content to be inserted below a row in the export. |
| `exportRowNumbers` | `boolean` |  |  | Set to `true` to allow the contents of the Row Numbers column to be exported. |
| `allColumns` | `boolean` |  | `false` | If `true`, all columns will be exported in the order they appear in the columnDefs. When `false` only the columns currently being displayed will be exported. |
| `columnKeys` | `(string \| Column)[]` |  |  | Provide a list (an array) of column keys or Column objects if you want to export specific columns. |
| `rowPositions` | `RowPosition[]` |  |  | Row node positions. |
| `fileName` | `string \| ExportFileNameGetter` |  | `export.csv` | String to use as the file name or a function that returns a string. |
| `exportedRows` | `'all' \| 'filteredAndSorted'` |  | `'filteredAndSorted'` | Determines whether rows are exported before being filtered and sorted. |
| `onlySelected` | `boolean` |  | `false` | Export only selected rows. |
| `onlySelectedAllPages` | `boolean` |  | `false` | Only export selected rows including other pages (only makes sense when using pagination). |
| `skipColumnGroupHeaders` | `boolean` |  | `false` | Set to `true` to exclude header column groups. |
| `skipColumnHeaders` | `boolean` |  | `false` | Set to `true` if you don't want to export column headers. |
| `skipRowGroups` | `boolean` |  | `false` | Set to `true` to skip row group headers if grouping rows. Only relevant when grouping rows. |
| `skipPinnedTop` | `boolean` |  | `false` | Set to `true` to suppress exporting rows pinned to the top of the grid. |
| `skipPinnedBottom` | `boolean` |  | `false` | Set to `true` to suppress exporting rows pinned to the bottom of the grid. |
| `skipPinnedRowDuplicates` | `boolean` |  | `false` | Set to `true` to omit the body copies of manually pinned rows. The rows in the pinned sections are still exported unless `skipPinnedTop` or `skipPinnedBottom` is enabled. |
| `valueFrom` | `CellValueResolveFrom` |  | `'data'` | The base source to use for getting cell values. `'data'`: values from the underlying row data `'batch'`: pending batch edit values (falls back to data if not in batch mode) `'edit'`: current editor values including live typing |
| `transformValues` | `boolean` |  | `true` | Apply the Show Values As transform (e.g. a percentage of a total) on top of the `valueFrom` base, so the export carries the displayed value for columns with an active mode. Columns without one export the base value. |
| `shouldRowBeSkipped` | `Function` |  |  | A callback function that will be invoked once per row in the grid. Return true to omit the row from the export. |
| `processCellCallback` | `Function` |  |  | A callback function invoked once per cell in the grid. Return a string value to be displayed in the export. For example this is useful for formatting date values. |
| `processHeaderCallback` | `Function` |  |  | A callback function invoked once per column. Return a string to be displayed in the column header. |
| `processGroupHeaderCallback` | `Function` |  |  | A callback function invoked once per column group. Return a `string` to be displayed in the column group header. Note that column groups are exported by default, this option will not work with `skipColumnGroupHeaders=true`. |
| `processRowGroupCallback` | `Function` |  |  | A callback function invoked once per row group. Return a `string` to be displayed in the group cell. |

### CsvCell

Properties available on the `CsvCell` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `data` | `CsvCellData` | Yes |  | The data that will be added to the cell. |
| `mergeAcross` | `number` |  | `0` | The number of cells to span across (1 means span 2 columns). |

### CsvCellData

Properties available on the `CsvCellData` interface.

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | `string \| null` | Yes |  | The value of the cell. |
