Search code examples
bootstrap-4bootstrap-table

Bootstrap export shows option to CSV ONLY


I have been googling around and checking the docs to see if it is possible to set the bootstrap table export extension to only show CSV or specific options. At the moment

data-show-export="true"

it is showing everything. Has seen here Codepen example Is it possible to set specifics export type(s)?

Thanks


Solution

  • Just add exportTypes: ['csv'] to bootstrapTable options.

    you can add more options to this array ['csv', 'excel'] etc...

    i have edited your codepen example: https://codepen.io/anon/pen/zmGWLq

    More detailes here:

    https://bootstrap-table.com/docs/extensions/export/