Datatables - Export to Excel
Datatables - Export to Excel
walkermd
Posts: 1Questions: 1Answers: 0
Hi
We're using Datatables in an application and have just started adding in the export to Excel function (using Buttons). It works great but have a question. In our tables we're using some hidden spans for sorting purposes (mostly dates). These hidden spans are also included in the export to Excel. Is there any way to not have these exported to Excel?
Thanks
Mark
This discussion has been closed.
Answers
buttons: [
{
extend: 'excel'',
exportOptions: {
columns: '1, 3, 4'
}
}
You replace 1 3 4 with whatever columns you want to export. I think you can also exclude certain columns, but don't remember exactly how.
Another option is to use orthogonal data or an output formatter.
Allan