Export Grid to Excel

Thread is closed for posting
1 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 13 Aug 2012 Link to this post


    Kendo UI Suite and Version


    jQuery Version


    Supported Browsers and Platforms

    All supported by Kendo UI  

    Components/Widgets used 


    ASP.NET MVC Version  

    In numerous cases you may need to export the data displayed by the Grid. This Code Library demonstrates two similar ways how to implement Excel export in a few lines of code.
    The difference between the two approaches is in the third party libraries used on the server side to generate the excel file.
    The first approach relies on the open source project NPOI and the second one relies on the Open XML SDK by Microsoft.
    To implement the second there is utility class used from the following blogpost by John DeVight.

    The sample page contains two grids each one with a hyperlink in the toolbar. When clicked the hyperlink requests the controller methods which will export the corresponding Grid data and stream it back as Excel file. The "dataBound" client-side events of the grids handle the update of the URL arguments of the different links required for export (current page, order and filter expressions).
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.