tableExport.jquery.plugin
tableExport.jquery.plugin copied to clipboard
Export with data-filter-control="select" give select options in table header
Hi thiazzz
i found the same problem you can resolve this with both methods
Declaring in th the data attribute
Just declare in th the data attribute data-tableexport-value = "new Column Name"
this ll overwrite the column header and became this new name
Using Callback for parseSting
You can use the onCellHtmlData
callback to parse this, as you can see:
$table.bootstrapTable({
...
exportOptions: {
onCellHtmlData: function (cell, rowIndex, colIndex, htmlData) {
return (htmlData.startsWith('<div') ? $(htmlData).html() : htmlData);
}
},
...
});
This will get just the content html of all divs and exclude the options from select
I hope it helped you
ref https://github.com/wenzhixin/bootstrap-table/issues/4005
Hello,
Bootstrap-table with bootstrap 4 does not work. Export + Filter Select option fail as thiazzz says. The items in the dropdown appear in the exported excel sheet
In the new online editor, In the new online editor, it doesn't work either.], it doesn't work either.

FYI: You are reporting this problem on the wrong project site. Bootstrap table uses a fork of kayalshri's plugin. I'm the author of that fork 😉
Edit: This problem should be fixed in v1.10.5 of the plugin and should be available as soon as this version is adopted by BT.
I confirm this problem is fixed on Version 1.10.6 without using the proposal of augusto3691
hello @thiazzz , you can check my example if you want https://github.com/Elhamassi/BootstrapTable/blob/master/index.html