2

I'm currently working on a project (developed using laravel, php, javascript, jquery, html), containing a large amount of data, so I'm using DataTables to display them with serverside set to true. What I'm trying to figure out is how to export the complete table to an excel file - right now it only saves one page (the one being shown at that very moment ) - using the Button extention.

I've been reading about it for a while now but still can't figure out a way to do this. I understand that, since serverside is set to true,

the only rows that exist on the client-side are those shown in the table at any one time.

But how can I get the complete table? Any help would be appreciated!

UPDATE: So I create the excel file with the data I want in the backend, using PHPExcel, but now the problem is that it is saved server-side, while I wanna make it downloadable (client-side). From what I've been reading, I must add the appropriate headers to do so, but nothing I've tried works. Using this, I managed to output the data of the excel in the screen, but it just shows gibberish... I should probably also mention that I'm new at this!

Renia Bah
  • 21
  • 3
  • You need do seperate query on backend with same filters during xls export, think about it outside datatable plugin. – Dimash Aug 14 '17 at 09:52
  • See this -> **https://datatables.net/forums/discussion/39680/is-there-a-way-to-export-all-while-using-server-side-processing** for an explanation – davidkonrad Aug 14 '17 at 09:54

0 Answers0