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

Export to Excel requires JSZip?

1 Answer 393 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Les
Top achievements
Rank 1
Les asked on 12 Nov 2016, 05:54 PM

I have basically copied the demo on your site...but I get the following error...any recommendations?

My grid populates, but when I press the Export To Excel button in the grid, nothing happens...

When I inspect my browser I get the following:
SCRIPT5022: JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.
kendo.all.js (11412,31)

-------------------------------

I have tried adding the following suggestion from the link, but that does not work

JSZip
To take full advantage of the Excel export feature, download the JSZip library and include the file before the Kendo UI JavaScript files, as shown below.
EXAMPLE
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script><script src="http://cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.js"></script><script src="http://kendo.cdn.telerik.com/2016.3.1028/js/kendo.all.min.js"></script>
JSZip is part of the Kendo UI distribution and is also available via the Kendo UI CDN:
<script src="http://kendo.cdn.telerik.com/2016.3.1028/js/jszip.min.js"></script>

 

 

------------------------------

@model IEnumerable<Areas.Name.Models.TransactionName>

<h2>Grid</h2>

@(Html.Kendo().Grid<Areas.Name.Models.TransactionName>()
        .Name("grid")
                .Columns(columns =>
                {
                    columns.Bound(c => c.LastName);
                    columns.Bound(c => c.FirstName);
                    columns.Bound(c => c.MiddleName1);
                })

        .BindTo(Model)
        .ToolBar(tools => tools.Excel())
        .Excel(excel => excel
            .FileName("Products.xlsx")
        )
        .Deferred()
        )

@* All initialization scripts are rendered to the bottom of the page, see Layout.cshtml *@
@section scripts {
    @Html.Kendo().DeferredScripts()
}

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 14 Nov 2016, 12:20 PM
Hello,

In the text that you quoted it says:

To take full advantage of the Excel export feature, download the JSZip library and include the file before the Kendo UI JavaScript files, as shown below.

And I can see that you are adding jsZip after Kendo UI, can you try to switch their places?

Regards,
Kiril Nikolov
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Les
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or