exclude column from export

exclude column from export

itramitram Posts: 41Questions: 14Answers: 0

Hello,
I want to export visible columns excluding the columns with class .noExport
setting export options to:
exportOptions: {
columns: ":visible:not(.noExport)"
}
and it works oposite as expected. It exports :visible and columns with class .noExport

setting
exportOptions: {
columns: ":visible.noExport"
}
works as per my need, but it seems contrary to what I expected.
Is it ok? and most important, will it work always or am I missing something?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    It seems to be working as expected here. I've put the class "noExport" on the "Position" column, and made the fourth column, "Age", not visible - and both of those aren't appearing in the export.

    Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.

    Cheers,

    Colin

  • itramitram Posts: 41Questions: 14Answers: 0

    Yes, it works as expected. Thanks.

    exportOptions: {
    columns: ":visible:not(.noExport)"
    }
    exports visible columns which have not the .noExport class.

    The problem was in another part of the code. Classes are added dynamically and there was a bug there which did the oposite of the expected.

Sign In or Register to comment.