layout: docs title: Table Export description: Table Export extension of Bootstrap Table. group: extensions
Use Plugin: tableExport.jquery.plugin
This is an important link to check out as some file types may require extra steps.
{% highlight html %} {% endhighlight %}
Attribute: data-show-export
type: Boolean
Detail:
Set true to show the export button.
falseAttribute: data-export-data-type
type: String
Detail:
Export data type, support: 'basic', 'all', 'selected'.
basicAttribute: data-export-footer
type: Boolean
Detail:
Set true to export the table footer.
falseAttribute: data-export-options
type: Object
Detail:
Export options of tableExport.jquery.plugin
exportOptions.fileName can be a string or a function, for example:
exportOptions: {
fileName: function () {
return 'exportName'
}
}
Attribute: data-export-types
type: Array
Detail:
Export types, support types: ['json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'xlsx', 'pdf'].
['json', 'xml', 'csv', 'txt', 'sql', 'excel']'glyphicon-export icon-share'Attribute: data-force-export
type: Boolean
Detail:
Set true to force export a column e.g. hidden columns.
falseAttribute: data-force-hide
type: Boolean
Detail:
Set true to force hide a column e.g. for icon columns.
falsejQuery Event: export-saved.bs.table
Parameter: exportedRows
Detail:
Fired when the data is exported, the parameter contain:
exportedRows: The exported rows (depends on exportDataType)jQuery Event: export-started.bs.table
Parameter: undefined
Detail:
Fired before the data will be collected and exported.
parameters: options
Detail:
Export table with custom options.
Parameter: undefined
Default: function () { return "Export data" }