Open xibman opened 9 years ago
If you use the header callback to insert column title, it isn't use on csv,excel and pdf export.
just change this line in _fnGetDataTablesData:
sLoopData = dt.aoColumns[i].sTitle.replace(/\n/g," ").replace( /<.*?>/g, "" ).replace(/^\s+|\s+$/g,""); sLoopData = this._fnHtmlDecode( sLoopData );
by
sLoopData = dt.aoColumns[i].sTitle !='' ? dt.aoColumns[i].sTitle : dt.aoColumns[i].nTh.innerText; sLoopData = sLoopData.replace(/\n/g," ").replace( /<.*?>/g, "" ).replace(/^\s+|\s+$/g,""); sLoopData = this._fnHtmlDecode( sLoopData );
If you use the header callback to insert column title, it isn't use on csv,excel and pdf export.
just change this line in _fnGetDataTablesData:
by