I have a problem in jquery dataTables. The "Export to Excel" is not showing in iPad and mobile devices. It is showing in desktop. Other buttons like copy, csv and pdf are showing in iPad and desktop. Here is my code :
$('#productDatatable').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'excel', 'pdf', 'csv'
]
} );
I know this is super old but since I was using Webpack 4 and Babel and I was importing the files (ES6) I had to put in the global scope the jsZip:
Hope it helps Cheers
I had same problem, it was not because of jquery scripts.
Go to browser setting(chrome in my case) > Search Flash >
Click on Control what information websites can use > it will navigate to content settings (chrome://settings/content?search=flash) >
Click on Flash >
In the Allow block add your website using Add button
i ran into the same problem in Asp.NET MVC 4. the thing is if you add your CDN/JS files in _layout page then the buttons wont show in Main View page. instead add those CDN/JS files into the page you are using for data Table. also make sure they are in correct order.
Okay so I had the same exact problem (Excel button not showing while the other buttons are), and it appears that you have to include your JavaScript files in a specific order, or it won't work.
For me the problem was that I was including buttons.html5.js before jszip.js, but you have to put them in this order:
And you also have to put these two files after the
DataTables
andDataTables.buttons
filesWhat I find problematic is that if you put them in the wrong order, there isn't any JavaScript error displayed in the browser console.
For me I was missing the
dom: 'Bfrtip',
attribute in my table definition.Export to Excel doesn't work on Mac either. From the datatable's website: "The excelHtml5 button will not work in Safari at all - as noted in the button's documentation. This is because of an unimplemented feature in Safari."
Note that even if you use Chrome in apple products, it still uses Safari's engine so it won't work.
It might be fixed in the future but for now I just added the CSV button