I am working in a Laravel project where I use jquery datatable to display lists of data. I also added Excel download button in datatable by using the options provided by the datatable.
In the listing, there is a box which is used to change the status (placed, processing, delivered, cancelled) of a listing.
The problem is that, whenever I am trying to export the listing as excel sheet, all column values are displaying well in the downloaded excel, but the status field () box displaying the first "placed" value for each listing even if they are value with "processing" or "cancelled".
What is the reason behind this ? Am I missing some option in datatable ? Here is my code :
**
$(document).ready( function () {
$('#myTable').DataTable({
"bPaginate": false,
dom: 'Bfrtip',
buttons: [
{
extend: 'csvHtml5',
text: '<img src="{{asset('admin_assets/images/CSV-logo.jpg')}}">',
titleAttr: 'CSV'
},
{
extend: 'excelHtml5',
text: '<img src="{{asset('admin_assets/images/excel.jpg')}}">',
titleAttr: 'Excel'
},
],
});
} );
**
I got stuck here. Please help me. Thanks in advance.