我在如何删除从数据表中导出的“数据导出”单元格时遇到问题。
这是我的数据表配置:
$('#example').DataTable({
dom: 'Bfrtip',
buttons: [
{
extend: 'excelHtml5',
text: 'Download Excel',
title: 'Data export'
}
],
"autoWidth": false,
"columns": [
{ "width": "20%" },
{ "width": "20%" },
{ "width": "20%" },
{ "width": "10%" },
{ "width": "15%" },
{ "width": "15%" }
]
});
从 Excel 按钮中删除标题选项。这样它就不会在导出的 Excel 工作表中添加标题。