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

Related issues

Mopster picture Mopster  路  3Comments

sangnguyenplus picture sangnguyenplus  路  3Comments

Abdulhmid picture Abdulhmid  路  3Comments

ahmadbadpey picture ahmadbadpey  路  3Comments

alejandri picture alejandri  路  3Comments