Laravel-datatables: How to exclude a column from export

Created on 14 Jun 2017  ·  3Comments  ·  Source: yajra/laravel-datatables

I'm using Laravel 5.4 + Yajra-dataTables 7.7 as Service.

How can I exclude a column from export? (eg. excel)

question

Most helpful comment

On your columns declaration, try setting exportable => false:

protected getColumns() {
  return [
    'id' => [
      'exportable' => false
    ]
  ]
}

All 3 comments

On your columns declaration, try setting exportable => false:

protected getColumns() {
  return [
    'id' => [
      'exportable' => false
    ]
  ]
}

Solved.
Thanks

@yajra hai, how to set exportable dynamically from javascript? because I need to visible or hidden some column and export it only for visible column

Was this page helpful?
0 / 5 - 0 ratings