Friends I'm using data table with export option but my requirement is . I have to download with search option . For example if I filter through position only those portion has to be downloaded . Where as now if I use the filter in table and give the export It is exporting whole value . I have attached The another image which I've to download only those values and not the whole value( Search filter enabled with position as Software Engineer) . So I will download only the data with position as software engineer.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Here is a generic example. It will show the PDF button and export only filtered rows :
$('#example').DataTable( {
dom: 'Bfrtip',
buttons: [{
extend: 'pdfHtml5',
exportOptions : {
rows : {search:'applied'}
}
}]
});