New to Telerik UI for ASP.NET MVCStart a free 30-day trial

Excel Export

The Spreadsheet utilizes the Kendo UI for jQuery Excel export framework to produce Excel files directly in the browser.

The output files are in the OOXML Spreadsheet format with an .xlsx extension. The legacy .xls binary format is not supported.

User Interface

The default toolbar configuration includes an Export button. Clicking it opens a dialog box for entering the file name and selecting the desired output format for the exported document.

UI for ASP.NET MVC Spreadsheet activating the Export to Excel dialog

The following image demonstrates the export of the Spreadsheet data to Excel.

UI for ASP.NET MVC Spreadsheet Exporting to Excel

API Export Reference

The Spreadsheet client-side API includes the saveAsExcel method for initiating the export with JavaScript. This method does not ask you to specify a file name. Instead, it sets the value in excel.fileName.

Razor
    @(Html.Kendo().Spreadsheet()
        .Name("spreadsheet")
        .Excel(ex => ex.FileName("Order.xlsx"))
    )

Outputting the Result

Through its default configuration the Telerik UI for ASP.NET MVC Spreadsheet exports the current sheet of data with sorting and filtering applied.

See Also