ExcelHTML5 doesnt export all data when using SSP with large tables

ExcelHTML5 doesnt export all data when using SSP with large tables

juanrcuervojuanrcuervo Posts: 1Questions: 1Answers: 0

Im using SSP to query a large data in a postgres Database. This works just fine.
Recently I decided to use the ExcelHTML5 button to export my data to excel. The excel file is created OK, but it only contains the rows of the current page. I have modified the exportOptions of the ExcelHTML5 button, but still doesnt works. I know SSP only retrieves from database one page of data at the time, but I wonder if is it any way to export all data from my table, not only the current page .

This is my Datatable configuration:

function loadData() {
tabla = $('#tabla').dataTable( {
"searching": false,
"processing": true,
"serverSide": true,
"ajax": { "url": "fetch_data_ws_report_cons.php",
"data": function ( d ) {
d.nic = document.getElementById("nic").value;
d.causal = document.getElementById("causal").value;
d.fecha_inicial = document.getElementById("fecha_inicial").value;
d.fecha_final = document.getElementById("fecha_final").value;
d.respuesta = document.getElementById("respuesta").value;
}
},
"language": { "url": "../lib/datatables.net-new/Spanish.json" },
"columnDefs": [ { "searchable": false, "targets": [0, 2, 3] } ],
"order": [[ 0, document.getElementById("orden").value ]],
dom: 'Bfrtip', buttons: [ 'copyHtml5', { extend: 'excelHtml5', text: 'Exportar a excel', exportOptions: { modifier: { page: 'all' } } } ]
} );
}

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Yep, when serverSide is set, the client only knows about the data on the current page. There are some threads which offer a solution, such as this one.

    We're currently working on export library which would provide this functionality, but it's a few months away still,

    Colin

This discussion has been closed.