Export Support

Telerik UI for ASP.NET Core integrates the Pako and JSZip libraries to support the content export of its components to PDF and Excel.

Pako Library

The Pako Deflate library enables the compression of the files that will be exported to PDF. To enable the PDF export, you need to load Pako in the specified page.

<!-- Load Pako Deflate library to enable PDF compression -->
<script src="http://kendo.cdn.telerik.com/2019.3.1023/js/pako_deflate.min.js"></script>

For more information on the available PDF export options by Kendo UI, refer to the articles on PDF Export and PDF output by the Drawing library.

JSZip Library

Since Excel files are a zipped collection of XML files, the JSZip library is necessary to process the generated workbook to an .xslx file.

Include the JSZip library:

  • To support client-side Excel export (all components)
  • To support Excel imports with the fromFile() method (Spreadsheet component)

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

<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/2019.3.1023/js/kendo.all.min.js"></script>

JSZip is part of the Kendo UI distribution and is also available through the Kendo UI CDN.

<script src="https://kendo.cdn.telerik.com/2019.3.1023/js/jszip.min.js"></script>
  • If you do not include JSZip in the page, Kendo UI will raise a runtime exception.
  • As of the Kendo UI R3 2017 release, the Excel Export feature supports JSZip 2.x and 3.x versions. Kendo UI releases prior to R2 2017 SP1 provided Excel export of JSZip 2.x versions only.

When you use JSZip in scenarios where the packages are loaded from NPM, explicitly assign the JSZip object to a field in the window object. To properly load JSZip in the application:

  1. Install the library and save it to the package.json file by running npm install jszip --save.
  2. Import the library in the module where it will be used through import JSZip from 'jszip'.
  3. Assign the library object to a field of the window by setting window.JSZip = JSZip.

Globalizejs Library

To use Globalizejs in your project, include it after the Kendo UI scripts.

Browser Support

Excel generation is available for all supported browsers. Saving a file needs a server-side proxy for older browser versions. For more information, refer to the article on saving files with Kendo UI for jQuery.

Some mobile browsers do not support the saving of files.

See Also

In this article
Not finding the help you need? Improve this article