Excel export is not supported in server binding mode.

2 posts, 0 answers
  1. Jason
    Jason avatar
    20 posts
    Member since:
    Aug 2016

    Posted 06 Apr Link to this post

    I am trying to do a simple Export to Excel but when I add the Export snippet to the grid I get the "Excel export is not supported in server binding mode." message. 

     

    I am actually pulling a list of Active Directory users from a custom Object. The Grid works perfect.  All I want to do is because to export the list to an Excel Spreadsheet.

     

    My Controller code, that returns my list

    public ActionResult GisUsersTL()
             {
                 var ADList = this.GetGisUsers("GISUsers");
                      ViewData["ADList"] = ADList;   //Testing Telerik option to bind data
                 return View("GISUsersTL", ADList);
             }

     

    RAZOR page that bombs

     

    @model IEnumerable<GISPortal.Models.ADGisUsers>
    @using GISPortal.Controllers

    <script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js"></script>
     @(Html.Kendo().Grid((IEnumerable<GISPortal.Models.ADGisUsers>)ViewData["ADList"])
             .Name("Grid")     
            .Columns(columns =>
            {
                columns.Bound(p => p.Username);
                columns.Bound(p => p.DisplayName);
                columns.Bound(p => p.Department);
                columns.Bound(p => p.Office);
                columns.Bound(p => p.JobTitle);
                columns.Bound(p => p.MobilePhoneNumber);
                columns.Bound(p => p.EmailAddress);
            })
               .Pageable() //Enable paging.
               .ToolBar(tools => tools.Excel())  //This is the line that bombs so I can't even add any more custom export lines.

    )

     

     

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1727 posts

    Posted 10 Apr Link to this post

    Hi Jason,

    If you would like to export the grid server-side you can use the SpreadStreapProcessing library. Please examine the article below that describes the approach in more detail:

    http://docs.telerik.com/aspnet-mvc/helpers/grid/excel-export#use-server-side-processing

    Regards,
    Viktor Tachev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top