GridCSVExportOptions
Represents the CSV export options for the Grid component. Extends CSVExportOptions from @progress/kendo-csv with all properties optional.
Definition
Package:@progress/kendo-react-grid
Syntax:
<Grid csv={{
fileName: 'export.csv',
preventFormulaInjection: true,
keys: ['ProductID', 'ProductName'],
names: ['ID', 'Name']
}} />
Properties
allPages?
boolean
Specifies whether to export all pages or only the current page when paging is enabled.
When true, exports all data ignoring pagination.
When false, exports only the current page of data.
true
data?
null | any[] | DataResult
Optional data to export to CSV instead of using the Grid's data prop. Useful when you want to export different data than what's displayed in the Grid.
delimiter?
string
Character used to separate values in a row. Must be a single character. Common delimiters: "," (default), ";", "|", "\t" (tab). Invalid delimiters automatically fall back to comma.
fileName?
string
Specifies the name of the exported CSV file.
"grid-export.csv"
Custom formatter for group header in grouped data exports. Receives the display names of grouped fields, returns the formatted header. Default: Joins display names with '/' separator (e.g., "Region/Category").
Array of display names for grouped fields (e.g., ['Region', 'Category'])
Returns:string
Custom formatter for group value rows in grouped data exports. Receives the values and field names, returns the formatted group value. Default: Joins values with '/' separator (e.g., "North/Electronics").
Array of values for this group (e.g., ['North', 'Electronics'])
groupNamesstring[]Array of field names for grouped fields (e.g., ['region', 'category'])
Returns:string
includeUTF8BOM?
boolean
When true, adds a UTF-8 Byte Order Mark (BOM) at the beginning of the file. Helps applications like Microsoft Excel correctly recognize UTF-8 encoding. Recommended when data contains non-ASCII characters (accents, emojis, etc.). Default: false.
keys?
null | string[]
Property names to extract from object/Map rows, in order.
Required when data contains objects or Maps (unless names is provided).
Defaults to names if not specified.
lineSeparator?
string
String used to terminate each line. Default: "\r\n" (CRLF, Windows/CSV standard). Alternative: "\n" (LF, Unix/macOS).
maxCellLength?
number
Maximum number of characters allowed per cell. Values exceeding this limit are truncated. Default: 32767 (Excel's maximum cell length).
maxColumns?
number
Maximum number of columns to export. Keys/columns exceeding this limit are automatically truncated. Default: 1000 (prevents memory exhaustion and DoS attacks).
maxRows?
number
Maximum number of rows to export. Data exceeding this limit is automatically truncated. Default: 1000000 (prevents memory exhaustion and DoS attacks).
names?
null | string[]
Optional column headers to render on the first line.
If provided, also used as default for keys when data contains objects/Maps.
preventFormulaInjection?
boolean
When true, prefixes potentially dangerous formula characters (=, +, -, @, tab, \r) with a single quote (') to prevent formula injection attacks in spreadsheet applications. Default: true (recommended for security).