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

Excel Export Rows Missing

5 Answers 180 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 06 Jun 2016, 10:19 AM

I am running into an issue where the Excel Export from my grid seems to be randomly missing rows.  As an example, I can see in Firebug that my REST service is returning 1,735 rows of data.  But when I export to Excel, the exported file and the excelExport event only shows 1,728 rows.  And that includes the Excel headings, so I should be seeing 1,736.  Other examples may be off by 1 or 2 rows.  And some are working exactly right.  Any thoughts on how to resolve this are appreciated.

I am using serverPaging and Kendo UI 2016.1.125.

excelExport Event

excelExport : function(e) {
   // debug
   var sheet = e.workbook.sheets[0];
   alert(sheet.rows.length);
}

dataSource

var ds = new kendo.data.DataSource({
    type: "json",
    pageSize:100,
    transport: {
        read: "../myurl"
    },
    serverPaging: true,
    schema: {
        model: {
            id: "rn",
            fields: {
                rn: { type: "number"},
                invno: { type: "string", editable: false},
                ....
            } // end fields
        }, // end model
        data: "invoices",
        total: "total" //have to have this with serverPaging set to true
    },
    error: function (e) {
        console.log("error ---> Status: " + e.status);
    }
});// end datasource

Data Returned from REST Service

{
    "total": 1735,
    "invoices":
    [
        {
            "rn": 1,
            "invno": "12345",
            ...
        },
        ....
        {
            "rn": 1735,
            "invno": "67890",
            ...
        }
    ]
}

 

 

5 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 06 Jun 2016, 06:07 PM
Please ignore this post.  I discovered a data issue that was causing this.  My fault.  Kendo UI is working perfectly.
0
Chris
Top achievements
Rank 1
answered on 22 Oct 2020, 03:20 PM

Hi,

 

I have the same problem, what was your fix, as I am at a loss to find my issue.

0
Nikolay
Telerik team
answered on 26 Oct 2020, 10:46 AM

Hello Simon,

This behavior is quite unusual and I will need more information so I can investigate it further.

- Are there any JS errors in the console?

- Are you missing rows on the Excel export or column data is missing?

Additionally, I will appreciate it if you can share a runnable page isolating and demonstrating the issue.  For example, you could modify the below Dojo:

Finally, please note that the built-in behavior of the Grid is designed to export only its current state—filtered, sorted, paged, and grouped. To change that please refer to the below article:

Regards,
Nikolay
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
Chris
Top achievements
Rank 1
answered on 02 Mar 2021, 10:34 AM

Hi Nikolay, I didn't see you reply until today - are you able to help resolve this, we were just on the verge of removing the export to excel and replacing with API and csv, so solving this would help a lot.

 

if you are able to help please email me on s.papworth@personcentedsoftware.com, or call / text me on +44 7766491597 and we will create your dojo's - I just don't want to if this is a dead issue.

 

Simon

 

 

0
Nikolay
Telerik team
answered on 03 Mar 2021, 04:05 PM

Hi Simon,

I will do my best to resolve this, however, I am not able to determine what the problem is without having the Grid declaration. As the thread owner (John) stated the problem was in the data and not the Grid export functionality.

Also, a problem with missing rows on the exported file has not been reported so far.

Please share a runnable Dojo so I can investigate further.

Regards,
Nikolay
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/.

Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Chris
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or