Remove extra data from excel table header when I export.

Remove extra data from excel table header when I export.

evobyteevobyte Posts: 4Questions: 3Answers: 0
edited July 15 in General

Hello,
Your Datatables plugin is very good, I've been using it for a while now and It is very usable. But I'm a little stuck in a place, I would be very helpful if you can help a little.

I want to export data by excel but you can see this screenshot >> https://www.screencast.com/t/d5UuVDpy6aGm there are some extra data added form datatable header filter.
I want to remove this extra data from excel table header when I export.

Also you can check here example link: https://demo.evobyte.ch/demo/datatable/excel_export/Controllo.html

Replies

  • colincolin Posts: 12,602Questions: 0Answers: 2,154

    It's because it's also including the values from the input elements. This example shows how you can modify the header text - in there you would need to extract the text before the <select> element, something like

     return $($('table').DataTable().column(index).header()).html().split('<')[0]
    

    Colin

Sign In or Register to comment.