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

Excel export failed with custom builder v.2015.3.930

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Florian
Top achievements
Rank 1
Florian asked on 19 Oct 2015, 05:19 PM

Hello,

I have a problem with the Excel export on the datagrid when using a script built using the custom download builder tool (http://www.telerik.com/download/custom-download). Version 2015.3.930.

To reproduce the problem I used this simple page :

 

<!DOCTYPE html>
<html>
<head>
    <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
    <title></title>
    <link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.3.930/styles/kendo.common-material.min.css" />
    <link rel="stylesheet" href="//kendo.cdn.telerik.com/2015.3.930/styles/kendo.material.min.css" />
 
    <script src="//kendo.cdn.telerik.com/2015.3.930/js/jquery.min.js"></script>
    <script src="//kendo.cdn.telerik.com/2015.3.930/js/jszip.min.js"></script>
    <script src="//kendo.cdn.telerik.com/2015.3.930/js/kendo.all.min.js"></script
</head>
<body>
 
        <div id="example">
            <div id="grid"></div>
 
            <script>
                $(document).ready(function() {
                    $("#grid").kendoGrid({
                        toolbar: ["excel"],
                        excel: {
                            fileName: "Kendo UI Grid Export.xlsx",
                            proxyURL: "//demos.telerik.com/kendo-ui/service/export",
                            filterable: true
                        },
                        dataSource: {
                            data: products,
                            schema: {
                                model: {
                                    fields: {
                                        ProductName: { type: "string" },
                                        UnitPrice: { type: "number" },
                                        UnitsInStock: { type: "number" },
                                        Discontinued: { type: "boolean" }
                                    }
                                }
                            },
                        },
                        height: 550,
                        scrollable: false,
                        sortable: false,
                        filterable: false,
                        columns: [
                            "ProductName",
                            { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "130px" },
                            { field: "UnitsInStock", title: "Units In Stock", width: "130px" },
                            { field: "Discontinued", width: "130px" }
                        ]
                    });
                });
            </script>
</div>
</body>
</html>

 

With this code, the Excel export works well.

 

Now, if instead of the kendo.all.min.js I will use a custom script with two configurations :

1) I select only the Grid component with the Excel export plugin --> the export works.

2) I select the Grid component ​with the Excel export plugin AND the Gantt componant --> the export failed with the javascript error: Object doesn't support property or method 'saveAsExcel'

The error only comes when the Gantt component is embedded int the custom script, and I need it...

I have made another test using the builder tool with ALL the components selected : it failed too. It makes me feel that the kendo.all.min.js is not the same script as the one the tool built (when selected all the components).

Any idea ?

 

 

 

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 21 Oct 2015, 01:57 PM
Hello,

Thank you for reporting this issue. We'll investigate and try to provide a fix in time for the next official release.

For the moment, my recommendation is to move the kendo.ooxml and kendo.excel scripts before the kendo.grid script:
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.core.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.data.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.popup.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.userevents.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.draganddrop.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.resizable.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.window.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.dom.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.touch.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.columnsorter.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.calendar.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.datepicker.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.timepicker.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.datetimepicker.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.numerictextbox.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.validator.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.binder.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.editable.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.gantt.list.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.gantt.timeline.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.ooxml.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.excel.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.grid.min.js"></script>
    <script src="http://cdn.kendostatic.com/2015.3.930/js/kendo.gantt.min.js"></script>


Apologies for the caused inconvenience.
I've updated 
our Telerik points as a token of gratitude for your involvement.

Regards,
T. Tsonev
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
Florian
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or