Export Excel Auto filter is not working.
Export Excel Auto filter is not working.
kgurunadh9
Posts: 1Questions: 1Answers: 0
I referred the below url
https://datatables.net/extensions/buttons/examples/html5/excelAutoFilter.html
and implemented, but not works.
====== my code as follows.===
$('#dataTables-ttreport').DataTable({
pageLength: 20,
dom: 'Bfrtip',
buttons: [
'colvis',
{
extend: 'excelHtml5',
autoFilter: true,
title: 'TimeTracker Report'
}
]
});
===== added the below files in Scripts, and Css Folder in application respectively.
jquery-3.3.1.js
jquery.dataTables.min.js
dataTables.buttons.min.js
jszip.min.js
buttons.html5.min.js
jquery.dataTables.min.css
buttons.dataTables.min.css
This discussion has been closed.
Answers
Happy to take a look at a test case that shows the issue. I'm presuming that the example you linked to above works for you?
Allan
Hi,
Just to share my story, in case somebody stumble upon it looking for answers.
I had the same issue. Using "autoFilter: true" did not enable column filtering.
There were no console errors printed.
However, the example linked above worked for me.
After some research, I found this discussion thread were the feature originated, and noticed that it was released end of 2018 in version 1.5.4.
On a hunch, I went into my datatables.min.js file and looked at the version. I had the following list:
JSZip 2.5.0, pdfmake 0.1.36, DataTables 1.10.18, Buttons 1.5.2, HTML5 export 1.5.2, Responsive 2.2.2
While I check regularly Datatables updates (and it is up to date, although there seems to be a 1.10.19 in Github but the downloader doesn't propose it), I never though of checking extensions.
Updating the Buttons/HTML5 export extensions to latest (1.5.6) did the trick and autoFilter now works.
By the way, thank you for this awesome library. It's really great !
.18 and .19 are code identical, which is why its not on the download page (new versions taken a frightening amount of disk space due to the build combinations - we are working on that!).
Good to hear you've got it working now .
Allan