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

[Solved] Kendo Angular Grid Export capability

3 Answers 182 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Siddhartha
Top achievements
Rank 1
Siddhartha asked on 30 Apr 2014, 05:55 PM
Hi,

How can we export a grid data to excel using Kendo grid for Angular?

3 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 01 May 2014, 12:27 PM
Hi Siddhartha,

Exporting a Grid to Excel is currently not supported out of the box. This functionality however, could be done using a third-party library on the backend. I would recommend checking this Code Library project, which demonstrates how that could be achieved.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Sam
Top achievements
Rank 1
answered on 11 Feb 2015, 05:15 AM
Hi Alexander,

Is this still the case or can we export to excel now?
I have followed the example at the following address however it is not working for me....
http://demos.telerik.com/kendo-ui/grid/excel-export

The 'excel' export button appears in the toolbar but nothing happens on click. I have pasted my code below....

in controller:
 $scope.mainGridOptions = {
            toolbar: ["excel"],
            excel: {
                fileName: "Movements_In_Route.xlsx",
                allPages: true
            },
            dataSource: {
                data: $scope.selectedItem.movementList,
                schema: {
                    model: {
                        fields: {
                            description: { type: "string" },
                            order_On_Route: { type: "number" },
                            degreeOfSaturation: { type: "number" },
                            occupancy: { type: "number" },
                            averageSpeed: { type: "number" },
                            averageDelay: { type: "number" },
                        }

                    }
                },
                pageSize: 20
            },
            height: 550,
            scrollable: true,
            sortable: true,
            filterable: true,
            pageable: true,
            columns: [{
                field: "description",
                title: "Description",
                width: "40%",
                template: "#= (description == null) ? 'Description not available' : description #"
            }, {
                field: "order_On_Route",
                title: "Order On Route",
                width: "10%",
                template: "#= (order_On_Route == null) ? '-' : order_On_Route #"
            }, {
                field: "degreeOfSaturation",
                title: "Saturation",
                width: "10%",
                template: "#= (degreeOfSaturation == null) ? '-' : degreeOfSaturation #"
            }, {
                field: "occupancy",
                title: "Occupancy",
                width: "10%",
                template: "#= (occupancy == null) ? '-' : occupancy + '%' #"
            }, {
                field: "averageSpeed",
                title: "Speed",
                width: "10%",
                template: "#= (averageSpeed == null) ? '-' : kendo.toString(averageSpeed, \"0.0\")+'km/hr'#"
            }, {
                field: "averageDelay",
                title: "Delay",
                width: "10%",
                template: "#= (averageDelay == null) ? '-' : kendo.toString(averageDelay, \"0.0\")+'min' #"
            }]
        };

Cheers,
Sam
0
Alexander Popov
Telerik team
answered on 11 Feb 2015, 07:32 AM
Hi Sam,

The built-in client-side Excel export was introduced with the Q3 2014 release (2014.3.1119). Consider upgrading in case you are using an older release and make sure that the jszip.min.js file included.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Siddhartha
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Sam
Top achievements
Rank 1
Share this question
or