Export parent and child data into an excel using Jquery-Datatable

Export parent and child data into an excel using Jquery-Datatable

prabhat00prabhat00 Posts: 2Questions: 0Answers: 0
edited January 2023 in Free community support

I've added this code it's only giving the data which on table not exported the detail/child data on the table.
$(document).ready(function() {
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [
'excel'
]
} );
} );

No Error message, I'm not able to export for both parent child into export excel.
I've attached the existing datatable and expected excel output.
But in my local only parent data exporting.

Please refer the image i shared the datatable having some child record

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Hi,

    It looks like you are using Responsive to show the child rows there, and actually the information for the salary column is being included as the F column in the spreadsheet. I would expect that.

    The Excel export does not support child row export at the moment, but even if it did, I think since you are using Responsive for the child rows, then the output you are getting at the moment is correct.

    Allan

  • prabhat00prabhat00 Posts: 2Questions: 0Answers: 0
    edited January 2023

    Thanks Allan for your response.

    Prabhat

Sign In or Register to comment.