This is a migrated thread and some comments may be shown as answers.

How to export to excel filtered data in kendo grid

2 Answers 306 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chamal
Top achievements
Rank 1
Veteran
Chamal asked on 04 Mar 2021, 05:38 PM
How to export to excel filtered data in kendo grid using angular 8 

2 Answers, 1 is accepted

Sort by
1
Accepted
Hetali
Telerik team
answered on 04 Mar 2021, 10:34 PM

Hello Aruna,

We have a dedicated article to Export Specific Data in the Kendo UI Grid. Using the given example, please make the following changes to export filtered data:

<kendo-grid
  [group]="group"
  [filter]="filter"
  [filterable]="true"
  (filterChange)="filterChange($event)">
</kendo-grid>

public group: any[] = [];
public filter: CompositeFilterDescriptor;

public allData(): ExcelExportData {
  const result: ExcelExportData =  {
    data: process(products, { filter: this.filter, sort: [{ field: 'ProductID', dir: 'asc' }] }).data,
    group: this.group
  };
  return result;
}

public filterChange(filter: CompositeFilterDescriptor): void {
  this.filter = filter;
  this.products = filterBy(products, filter);
}

In this StackBlitz example, the filtered data in the Kendo UI Grid is exported in an Excel file.

I hope this helps. Please let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Chamal
Top achievements
Rank 1
Veteran
answered on 08 Mar 2021, 12:28 PM
Thank you...
Tags
Grid
Asked by
Chamal
Top achievements
Rank 1
Veteran
Answers by
Hetali
Telerik team
Chamal
Top achievements
Rank 1
Veteran
Share this question
or