Skip to content
+

GridCsvExportOptions Interface

The options to apply on the CSV export.

Demos

Import

import { GridCsvExportOptions } from '@mui/x-data-grid-premium';
// or
import { GridCsvExportOptions } from '@mui/x-data-grid-pro';
// or
import { GridCsvExportOptions } from '@mui/x-data-grid';

Properties

Name Type Default Description
allColumns? boolean false If true, the hidden columns will also be exported.
delimiter? string ',' The character used to separate fields.
fields? string[] The columns exported.
This should only be used if you want to restrict the columns exports.
fileName? string document.title The string used as the file name.
getRowsToExport? (params: GridCsvGetRowsToExportParams) => GridRowId[] Function that returns the id of the rows to export on the order they should be exported.
includeColumnGroupsHeaders? boolean true If true, the CSV will include the column groups.
includeHeaders? boolean true If true, the CSV will include the column headers and column groups.
Use includeColumnGroupsHeaders to control whether the column groups are included.
utf8WithBom? boolean false If true, the UTF-8 Byte Order Mark (BOM) prefixes the exported file.
This can allow Excel to automatically detect file encoding as UTF-8.