CSV Data Export
Export grid data to CSV format with customizable headers, delimiters, and transformations in LyteNyte Grid.
LyteNyte Grid can export grid data directly to CSV, letting you capture a selection or the entire dataset in a standard format.
Export to CSV
Use the exportCsv API method to export selected data or the entire rendered dataset. To download a
CSV file directly, use the convenience method exportCsvFile, which runs exportCsv and returns a
downloadable file blob.
Export CSV
exportCsv returns a Promise<string> containing the CSV content. When exporting a selection, you
can specify any rectangular area, not just the current selection.
grid.api.exportCsv({dataRect: { rowStart: 2, rowEnd: 4, columnStart: 4, columnEnd: 2 },});
CSV Delimiter
Set the delimiter option to control the character separating CSV fields. The default is a comma
(,).
Include Headers and Group Headers
By default, exportCsv exports only cell data.
- Set
includeHeaders: trueto include column headers. - Set
includeGroupHeaders: trueto include group headers.
Group headers often span multiple columns. By default, only the first spanned column contains the
header value, leaving the rest blank. To repeat the header across all spanned columns, set
uniformGroupHeaders: true. This produces a perfectly rectangular CSV output.
Grid Box
The LyteNyte Grid PRO library includes a versatile list component called GridBox. This component can be used to create both horizontal and vertical lists that integrate seamlessly with LyteNyte Grid.
Export Excel
Implement Excel export in LyteNyte Grid using third-party libraries like ExcelJS.