exculde dynamic columns while exporting

exculde dynamic columns while exporting

devikamdevikam Posts: 3Questions: 1Answers: 0

Hi,

I am using datatable.js with tabletools for export(copy, csv, xls) functionality. I have a requirement to remove certain (dynamic) columns while exporting.

for example: In my case I have 113 columns that needs to be exported and I needs to remove 100,111,114,116th column from exporting. Including column indexes doesn't suit my requirement as columns changes frequently

Please suggest a way so that it works.

thanks in advance

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    This example shows how you can use a column selector to pick the columns you want for the export.

    Allan

  • devikamdevikam Posts: 3Questions: 1Answers: 0

    Hi Allan,

    even column selector doesn't suit my requirement. Is there any other option to exclude dynamic data from exporting.

    thanks

  • devikamdevikam Posts: 3Questions: 1Answers: 0

    Is there any way to exclude columns using headerText. In my case I am using mColumns.?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    You can use the columns selector as a function (see column-selector) which would give you the ability to decide on-the-fly if you want to use a column, and yo check if you want to with whatever logic condition you need.

    Allan

This discussion has been closed.