āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/1771-technologies/lytenyte/(export)/export-csv ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
LyteNyte Grid can export grid data directly to CSV, letting you capture a selection or the entire dataset in a standard format.
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.
!demo:Export CSV="./demos/csv-export"
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 },
});
Set the delimiter option to control the character separating CSV fields. The default is a comma
(,).
By default, exportCsv exports only cell data.
includeHeaders: true to include column headers.includeGroupHeaders: true to 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.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā