Export header names not working when using Filtering at the top

Export header names not working when using Filtering at the top

MadBoyEvoMadBoyEvo Posts: 119Questions: 38Answers: 0

Link to test case:
http://live.datatables.net/huvegidu/1/edit
Description of problem:
When I generate a table with filtering at the top export to excel, or copying ignores the headers. It works fine when filtering is set to bottom.

Any workaround?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765
    Answer ✓

    You are overwriting the header with the search input. I suspect Datatables strips the HTML so the header row has empty values. You can use the exportOptions format option to format the header to return the placeholder attribute, like this:
    http://live.datatables.net/huvegidu/4/edit

    Also see this example.

    Kevin

Sign In or Register to comment.