Currently there is no built in way to do this in TableTools. You'd need to modify the TableTools source to include the extra row in the header. TableTools currently only reads the content from the 'sorting' header cells.
Thank you allan.I found the code in the TableTools.The function _fnGetDataTablesData is to control save the content of the table.The head's code:
//line 1505
/*
* Header
*/
if ( oConfig.bHeader )
{
aRow = [];
aData.push( aRow.join(oConfig.sFieldSeperator) );
}
But I have no idea how to modify it.I just learn js no longer time.I only can read something from it.Could you help me.
There is an alternative solution to this, where replacing colspan/rowspan with empty s can export all rows of headers to csv/excel, as I explained in the post below:
hello pss.I try the solution.But it doesn't work well. I also try the other solutions in http://stackoverflow.com/questions/7660683/tabletools-only-exporting-single-header-row.The same,they doesn't work well.If someone who has a good solution to the problem.Thank you so much.Tel me.....
Replies
Allan
//line 1505
/*
* Header
*/
if ( oConfig.bHeader )
{
aRow = [];
for ( i=0, iLen=dt.aoColumns.length ; i/g, "" ).replace(/^\s+|\s+$/g,"");
sLoopData = this._fnHtmlDecode( sLoopData );
aRow.push( this._fnBoundData( sLoopData, oConfig.sFieldBoundary, regex ) );
}
}
aData.push( aRow.join(oConfig.sFieldSeperator) );
}
But I have no idea how to modify it.I just learn js no longer time.I only can read something from it.Could you help me.
http://stackoverflow.com/questions/7660683/tabletools-only-exporting-single-header-row/14813085#14813085
Although, headers are not merged in csv/excel, so I'm too looking forward if a better solution can be there.