• Docs
  • API
  • Help
  • Blog
  • GitHub

›Export to CSV Definition

Table Definition

  • BootstrapTable Props

Column Definition

  • Columns Props

Cell Editing Definition

  • Cell Editing Props

Pagination Definition

  • Pagination Props

Row Select Definition

  • Row Selection Props

Row Expand Definition

  • Row Expand Props

Column Filter Definition

  • Column Filter Props

Search Definition

  • Search Props

Export to CSV Definition

  • Export CSV Props

Export CSV Props

Export CSV in one of features supported by react-bootstrap-table2-toolkit. By passing exportCSV prop to ToolkitProvider for enabling this functionality.

Required

N/A

Optional

  • fileName
  • separator
  • ignoreHeader
  • ignoreFooter
  • noAutoBOM
  • blobType
  • exportAll
  • onlyExportSelection
  • onlyExportFiltered

Example

<ToolkitProvider
  keyField="id"
  data={ products }
  columns={ columns }
  exportCSV={ {
    fileName: 'custom.csv',
    separator: '|',
    ignoreHeader: true,
    noAutoBOM: false
  } }
>
  //...
</ToolkitProvider>

exportCSV.fileName - [Bool]

Custom the csv file name.

exportCSV.separator - [String]

Custom the csv file separator.

exportCSV.ignoreHeader - [bool]

Default is false. Give true to avoid to attach the csv header.

exportCSV.ignoreFooter - [bool]

Default is true. Give false to attach the table footer if enabled.

exportCSV.noAutoBOM - [bool]

Default is true.

exportCSV.blobType - [string]

Default is text/plain;charset=utf-8. Change to update the blob type of the exported file.

exportCSV.exportAll - [bool]

Default is true. false will only export current display data on table.

exportCSV.onlyExportSelection - [bool]

Default is false. true will only export the data which is selected

exportCSV.onlyExportFiltered - [bool]

Default is false. true will only export the data which is filtered/searched.

Note: When you configure this prop as true, you must turn off exportAll.

← Search Props
Docs
Getting StartedAPI References
Community
Stack OverflowProject ChatTwitter
More
BlogGitHubStar
Copyright © 2020 react-bootstrap-table2.