Skip to content

Export to CSV

Robert Hjalmers edited this page Nov 18, 2017 · 2 revisions

Export table data to CSV and optionally pass a file name, pass true as second parameter to use BOM. Please note that the table exports data after sort order, filters and global search have been applied. In case you use the lazy load feature you'll have to implement the export server-side.

Define custom export value for individual columns by declaring a custom export function in the fields array, ie. you might want the export one value but display/render another in the table ex. export 100000 as a number but display it as a string 1 000 000,00 in the table.

Turn of export for individual columns by setting column setting property export to false.

Usage

(click)="myTable.exportCSV('custom-file-name', true)"