datatables tabletools – >仅导出选定的行
我在一个大表上使用带有tabletools的数据表,该表通过ajax请求填充。
当用户选择多行时,它会在表中将其显示为已选中。
我怎么能告诉csv / xls导出只导出选定的行?
提前致谢
愚蠢的我…
刚刚得到它:
{ "sExtends": "csv", "bSelectedOnly": true }
如果对于像我bSelectedOnly
人bSelectedOnly
不工作(例如,只有在选择时才会复制所有行),在刻录到cry之前,只需检查你运行的2.2.3
版本的dataTables.tableTools.js
有错误已在此更正发布: https : //github.com/DataTables/TableTools/commit/a9afb46cb00417db6d0fd6d7697e5d28830bc959
Fix #48: `bSelectedOnly` option was not working in 1.10. * Fix is to use the new `fnGetSelectedIndexes` which gives the information required for `bSelectedOnly` when needed.