Hi Team,
Kendo Angular Grid --> How to Export the entire records to excel instead of page level
I have Kendo Angular gird and Export to Excel option as well, while doing export to excel it is download only current page not entire records.
Can you please guide me how to download export to excel with entire records?
Note: if I select page size manually to 1000 (example) download all the records, here our requirement is while clicking on Export to excel itself download all records.
Thanks,
Sankar
1 Answer, 1 is accepted
To export a data set that is different than the one, currently displayed in the Grid (after paging, filtering, etc. are applied), you can utilize the fetchData callback as described in the following section of our documentation and the auxiliary runnable demos:
https://www.telerik.com/kendo-angular-ui/components/grid/export/excel-export/#toc-exporting-specific-data
I hope this helps.
Regards,
Dimiter Topalov
Progress Telerik
I cannot find such an option on process.
Hello Dmitris,
To export only selected rows in excel, please take a look at this forum thread.
https://www.telerik.com/forums/kendo-grid---export-into-excel-only-selected-rows
Regards,
Martin
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/.
Thanks Martin
I've already did check that and implement it, but the problem with that is that you declare which columns you want to display on the exported file and not just those that are not hidden by the user.
In my case I have an action column in the begining of the grid with EDIT, VIEW, DELETE icons and of course I don't want to show that one on the PDF and Excel exports.
How can I only exclude this one but for all the others columns to follow what the user has selected as visible and hidden?
I tried adding only my actions column with attribute hidden = true but like this it was exporting an empty PDF.
And my other problem is that I am building the columns in the component because I followed another of your examples for persistent filters, sorting etc (which btw has a bug on column reordering when we have hidden columns), so I had to remove everything from the HTML to the component.
Thanks
Hello Dimitris,
By default, the grid exports its current columns. In order to include or exclude columns in the exported excel file, the developer can customize the exported columns by defining them between the <kendo-grid-excel> tags e.g.:
<kendo-grid-excel fileName="Products.xlsx">
<kendo-excelexport-column field="ProductName" title="Product Name">
</kendo-excelexport-column>
<kendo-excelexport-column field="Category.CategoryName" title="Category">
</kendo-excelexport-column>
</kendo-grid-excel>
I hope this helps.
Regards,
Martin
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/.
Thanks Martin,
but when you define them like this, it ignores which columns are hidden and which are visible by the user.
What I need is what it does by default excluding the ACTIONS column with the add, edit, view etc buttons.
All the rest columns should be whaterver the user selected.
Hi Dimitris,
The developer can iterate a column configuration object in <kendo-excelexport-column> component directly e.g.:
<kendo-grid-excel fileName="Products.xlsx">
<kendo-excelexport-column
*ngFor="let column of columnsConfig"
[field]="column.field"
[title]="column.title"
[hidden]="column.hidden"
>
</kendo-excelexport-column>
When columns are hidden dynamically, in columnVisibilityChange handler, the respective hidden property from the column config array can be updated.
Regards,
Martin
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/.
Hello, sorry for the thread revival.
I have some <kendo-excelexport-column> definitions to define which columns I want to export. The problem is when I do this, it will export only the current page of the grid. How can I combine custom columns export and all pages export?
regards, Ignacio.
Hello
Another question, I want to add a dropdown button with both options i.e. a) Export Current page, b) Export All pages
Is this possible , as I could see only the two excel buttons Export to Excel and Export to PDF to appear
Regards
Hay