Want to add dynamic footer into datatable.
Want to add dynamic footer into datatable.

How can I add dynamic footer into datatable.
Example:-
I want to add Created By and Created Date into the Excel and Pdf.
Is there any possible way to do that
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I believe the
tfoot
needs to be in the DOM when Datatables initializes for Datatables to know there is a footer and include it in the export. See this example that shows how to configure footer export with the buttons.Kevin
Actually I was looking for messageTop & messageBottom.
{
extend: 'excelHtml5',
title: 'Title '+month+'-'+year,
messageTop:'Test Top',
messageBottom: '\n This is system generated report on '+current_date,
text: '<i class="fa fa-file-excel-o"></i> Export Excel',
titleAttr: 'Excel'
}
@kthorngren ... please check this example.. https://datatables.net/examples/ajax/objects.html
If I want to print salary along with '.00' what to do. example.. in fisrt row of example's result is 162,700 but i want to print 162,700.00