How to remove the blank row on the 3rd line of the export to excel?

How to remove the blank row on the 3rd line of the export to excel?

htimminshtimmins Posts: 3Questions: 1Answers: 0

I need to remove the blank 3rd row on the export as it blocks my users using Excel filters without deleting that row.

This question has an accepted answers - jump to answer

Answers

  • rf1234rf1234 Posts: 3,066Questions: 89Answers: 427

    Post a test case please. Normally there is no blank row.
    https://editor.datatables.net/examples/extensions/exportButtons

    Alternatively check your HTML. Maybe you have an empty <th> or <tr> in there?!

  • htimminshtimmins Posts: 3Questions: 1Answers: 0

    @rf1234 Hi, you are right, I have a filterRow on the top of each column.

    I have tried to use this:
    exportOptions: {
    columns: exportedColumns,
    rows: ":not('#filterRow')"
    }

    But the "not" selector isn't working. Do you have any ideas?

  • kthorngrenkthorngren Posts: 21,790Questions: 26Answers: 5,042
    Answer ✓

    See this example for how to remove header rows from the export.

    Kevin

  • htimminshtimmins Posts: 3Questions: 1Answers: 0

    @kthorngren Brilliant, thank you

Sign In or Register to comment.