Results 1 to 2 of 2

Thread: How to download all records from Datagrid to Excel file

  1. #1
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    31
    Vote Rating
    0
      0  

    Default How to download all records from Datagrid to Excel file

    Hi

    I am trying to download all the records that are available in datagrid to Excel/CSV file.
    Problem for me was it is only exporting the records that are showing on the screen but not all the recordset.

    Also I was wondering if we apply filters on the data can we just download that dataset also?

    I would appreciate if any kind of help.

    Thanks
    Krishna

  2. #2
    Sencha User existdissolve's Avatar
    Join Date
    Jan 2010
    Location
    Kansas
    Posts
    522
    Vote Rating
    88
      0  

    Default

    I know there are plugins that help a bit with some of the printing, but seriously, I think the best way is to let the server handle this.

    For me, I simply send back to the server the same request I made to get the records, but add an extra param for "switching" to excel mode. My server-side code will then process the query just as it normally would, but then it will create the excel file and push it for download.

    The reason I like this is because it is simple, and it allows me as much freedom as I want to manipulate the data server-side before creating the Excel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •