Editor - Excel button exportOptions - modifier: {selected: null} invalidates defined columns: []
Editor - Excel button exportOptions - modifier: {selected: null} invalidates defined columns: []
Hi, the demo can be viewed at
https://nfctech.eu/datatables/editor-select2-bootstrap.html
The code is
{ extend: 'excel', title: null, exportOptions: {columns: [1, 2, 3, 4]}, className: 'visible-lg-inline-block btn-primary'
, exportOptions: {modifier: {selected: null}}
}
I expect that only the first 4 columns defined in
exportOptions: {columns: [1, 2, 3, 4]}
are exported in Excel, but, due to the presence of
exportOptions: {modifier: {selected: null}}
(that should only allow the export of all the rows and not of the selected ones) all the 8 columns are exported.
If I comment the option
exportOptions: {modifier: {selected: null}}
everithing works fine and only the first 4 columns are exported.
Any suggestion how to bypass the issue?
Thanks
This question has an accepted answers - jump to answer
Answers
Have you tried combining them into one
exportOptions
? Like this:I think the second is overwriting the first.
Kevin
It works, many thanks.