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 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'.
Default: ['json', 'xml', 'csv', 'txt', 'sql', 'excel']
Default: {}
'glyphicon-export icon-share'Attribute: data-force-export
type: Boolean
Detail:
Set true to force export a column e.g. hidden 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)parameters: options
Detail:
Export table with custom options.
Parameter: undefined
Default: 'Export data'