This is a migrated thread and some comments may be shown as answers.
Excel export limited number of rows
1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
rina
Top achievements
Rank 1
rina asked on 26 Sep 2019, 04:01 PM

Hi,

due to large amount of data in the grid, excel export does not work (>50.000 records). Is there a way to achieve this? Using 

.AllPages(false)

only exports a number of records equal to the page size. I would like to be able to let's say export 200 records per .xls file.

Is there possible to use smth similar to https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/excelexport 

Is there a way to achieve this and can you maybe share an small example? 

Thanks a lot,

rina

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 30 Sep 2019, 07:49 AM

Hi Rina,

The Kendo UI Grid could be configured to either export the first page or all pages. Hence, exporting only a certain amount of items has to be handled separately. Generally, what I could recommend is to handle the ExcelExport and prevent the default execution of the event. Then, manually export the Grid using the saveAsExcel() method. And load only the desired rows. A similar approach could be found in the following forum thread:

https://www.telerik.com/forums/export-to-grid-hide-columns#on_CdInsGESYqc5Jumibow

As per the export of large data, it is actually a browser limitation that is imposed. If the AllPages property is set to true, the grid would make a request for all of the data. And this data could not be serialized on the client. 

In such cases, I can recommend taking advantage of the server export functionality. An example could be found here:

https://demos.telerik.com/aspnet-mvc/grid/server-export

Let me know in case further assistance is required.

 

Best regards,
Tsvetomir
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
rina
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or