Get all data from Buttons extension (Excel)

后端 未结 1 1389
囚心锁ツ
囚心锁ツ 2021-01-22 20:56

We\'ve got a DataTable working with paging - no problem. There\'s a requirement to include an \"Export to Excel\" button. So, we added the \"Buttons\" extension and have the d

1条回答
  •  清酒与你
    2021-01-22 21:34

    Neither Buttons extension nor TableTools extension (now retired and replaced by Buttons) have the ability to export all data in server-side processing mode. See this comment from the author of jQuery DataTables.

    You can either:

    • switch to client-side processing which may not be the option with large datasets, or
    • implement Excel generation on the server by sending it the same request that was used to generate the table. Use ajax.params() to get the data submitted by DataTables to the server in the last Ajax request.

    0 讨论(0)
提交回复
热议问题