datatable 몇일째 수정중인데...
이게 찾아도 자료가 잘 안나온다...
몇일동안 구글링해본결과
https://datatables.net/extensions/buttons/examples
여기 공식도큐먼트인듯한데 여기서
example 찾아서 해야 할듯 하다.
그런데 코드가 하다말아놔가지고 찾기가 증말 힘들다..
간단하게
원하는 컬럼만 export하는부분은
{
extend: 'excel',
text: feather.icons['file'].toSvg({class: 'font-small-4 mr-50'}) + 'Excel',
className: 'dropdown-item',
exportOptions: {
columns: ':not(.actions, .control, .homeData, .awayData)',
}
},
이렇게 exportOptions에 not 을 넣어주면 된다 .
not안에는
{
targets: 2,
className: 'homeData',
render : function (data, type, full, meta) {
return full['homeAlleyName'] + ' / ' + full['homelaneCount'];
}
},
컬럼에 지정해준 className 을 넣어주면 된다.
끝