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

What is the max value of Excel Export for Kendo Gird

1 Answer 917 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adil
Top achievements
Rank 1
Iron
Veteran
Iron
Adil asked on 28 May 2020, 09:27 AM

Hi All,

 

I'm using kendo mvc grid and sometimes i have 15k data or 100k data and sometimes i need to export excel them with 5k data and using your export excel function but it creates problem to me

Is there any limitation for row value? How can i handle this? 

I want to export excel all my grids from toolbar actions... How can you help me?

Here is my grid..

@(Html.Kendo().Grid<ATGAlerts>()
                    .Name("grdWaterAlert").AutoBind(false)
                    .HtmlAttributes("width: 100%;cellpadding:0;")
                    .DataSource(d => d.Ajax().Read("GridWaterAlertBinding", "Dashboards"))
                    .Columns(columns =>
                    {
                        columns.Bound(e => e.BelIdent).Title("Id").Width("auto");
                        columns.Bound(e => e.StationCode).Title("Station Code").Width("auto");
                        columns.Bound(e => e.StationName).Title("Station Name").Width("auto");
                        columns.Bound(e => e.BelTarih).Title("DateTime").ClientTemplate("#= kendo.toString(BelTarih, 'MM/dd/yyyy') #").ClientGroupHeaderTemplate("DateTime" + ": #=  kendo.toString(value, 'MM/dd/yyyy') #").Width("auto");
                        columns.Bound(e => e.BelInsTime).Title("Alert Time").ClientTemplate("#= kendo.toString(BelInsTime, 'MM/dd/yyyy HH:mm tt') #").ClientGroupHeaderTemplate("DateTime" + ": #=  kendo.toString(value, 'MM/dd/yyyy HH:mm tt') #").Width("auto");
                        columns.Bound(e => e.BelTankId).Title("Tank ID").Width("auto");
                        columns.Bound(e => e.ProductCode).Title("Product Code").Width("auto");
                        columns.Bound(e => e.BelAlarm).Title("Alarm").Width("auto");
                        columns.Bound(e => e.BelTotCapacity).Title("Total Capacity").Width("auto");
                        columns.Bound(e => e.BelWaterVol).Title("Water Volume").Width("auto");
                    })
                    .ToolBar(toolBar =>
                    {
                        toolBar.Excel().HtmlAttributes(new { @class = "btnexcel" }).Text(" ").IconClass("k-i-excel");
                        toolBar.Custom().Text((string)ViewData["ClearFilter"]).HtmlAttributes(new { @class = "k-button", id = "cleargrid", href = "#", onclick = "clearFiltersWaterLevel()" });
                    })
                    .Excel(excel => excel.FileName("WaterAlert.xlsx").Filterable(true))
                    .Selectable()
                    .Sortable()
                    .Pageable(pageable => pageable
                    .Refresh(true)
                    .PageSizes(true)
                    .ButtonCount(5))
                    .Filterable(filterable => filterable
                    .Extra(false)
                    .Operators(operators => operators
                    .ForString(str => str.Clear()
                    .StartsWith((string)ViewData["Startswith"])
                    .Contains((string)ViewData["Contains"])
                    ))
                    )
                    .Groupable()
                    .Scrollable(scrolling => scrolling.Height("100%"))
                    .Resizable(config =>
                    {
                    config.Columns(true);
                    })
                    .Reorderable(config =>
                    {
                    config.Columns(true);
                    })
                    .ColumnMenu()
                )

 

 

 

Thanks for help!

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 01 Jun 2020, 07:52 AM

Hi Adil,

Thank you for sharing the Grid declaration.

The built-in Kendo UI Grid conducts its export on the client with browser resources. The Excel Export functionality may not work when the data cells which need to be processed exceed the capacity of the modern browser. The maximum capacity is system-specific as outlined in the documentation:

In the case of having 100 000 records, I am able to export a grid with 4 columns after approximately 7 seconds on my machine using Chrome version 81.0.4044.138.

If you wish to export a large data set, I would suggest you try the following:

1) Increase the content length of the port requests that the server accepts
2) Increase the MaxJsonLength as well

For huge amounts of data that cannot be handled with the proxy, I suggest checking out the Server-side implementation of the Excel export with the RadSpreadStreamProcessing library.

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Adil
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Nikolay
Telerik team
Share this question
or