【发布时间】:2015-12-03 09:08:32
【问题描述】:
嗨,我有这张表,我想导出,但是当内容很短时,一列的宽度太长了导出时,这是我的代码
$(document).ready(function() {
var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
var d = day + "-" + month + "-" + year;
$('#detailTable').DataTable({
dom: 'Bfrtip',
buttons: [{
extend: 'excelHtml5',
title: d + ' Purchase Orders'
}, {
extend: 'csvHtml5',
title: d + ' Purchase Orders'
}, {
extend: 'pdfHtml5',
title: d + ' Purchase Orders',
orientation: 'landscape',
pageSize: 'LEGAL',
exportOptions: {
columns: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
}
}]
});
});
有没有办法可以设置特定列的宽度?提前谢谢
【问题讨论】:
标签: pdf datatables