Possible TableTools Bug?
Possible TableTools Bug?
robertbrower
Posts: 158Questions: 1Answers: 0
From the code:
/*
* Footer
*/
if ( oConfig.bFooter && dt.nTFoot !== null )
{
for (i = 0, rowCount = dt.nTFoot.rows.length; i < rowCount; i++) {
aRow = [];
for ( j=0, iLen=dt.aoColumns.length ; j/g, "");
sLoopData = this._fnHtmlDecode( sLoopData );
aRow.push( this._fnBoundData( sLoopData, oConfig.sFieldBoundary, regex ) );
} else {
}
}
}
aData.push( aRow.join(oConfig.sFieldSeperator) );
}
}
_sLastData = aData.join( this._fnNewline(oConfig) );
return _sLastData;
},
I believe the line that reads:
if (dt.nTFoot.rows[i].cells[j] !== null) {
should read:
if (dt.nTFoot.rows[i].cells[j] !== undefined) {
Or could I be wrong?
The reason why I say this is the value seems to be 'undefined' when there is a hidden column when j is the max index.
I am using these options:
, "oTableTools": {
"sSwfPath": urls.MediaUrl + "Scripts/DataTables-1.9.1/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
, "aButtons": [
{
"sExtends": "csv"
, "mColumns": "visible"
}
]
}
Because I have footer rows. And the first column is hidden. And there is no CSV exported.
Robert
/*
* Footer
*/
if ( oConfig.bFooter && dt.nTFoot !== null )
{
for (i = 0, rowCount = dt.nTFoot.rows.length; i < rowCount; i++) {
aRow = [];
for ( j=0, iLen=dt.aoColumns.length ; j/g, "");
sLoopData = this._fnHtmlDecode( sLoopData );
aRow.push( this._fnBoundData( sLoopData, oConfig.sFieldBoundary, regex ) );
} else {
}
}
}
aData.push( aRow.join(oConfig.sFieldSeperator) );
}
}
_sLastData = aData.join( this._fnNewline(oConfig) );
return _sLastData;
},
I believe the line that reads:
if (dt.nTFoot.rows[i].cells[j] !== null) {
should read:
if (dt.nTFoot.rows[i].cells[j] !== undefined) {
Or could I be wrong?
The reason why I say this is the value seems to be 'undefined' when there is a hidden column when j is the max index.
I am using these options:
, "oTableTools": {
"sSwfPath": urls.MediaUrl + "Scripts/DataTables-1.9.1/extras/TableTools/media/swf/copy_csv_xls_pdf.swf"
, "aButtons": [
{
"sExtends": "csv"
, "mColumns": "visible"
}
]
}
Because I have footer rows. And the first column is hidden. And there is no CSV exported.
Robert
This discussion has been closed.
Replies
/*
* Footer
*/
if ( oConfig.bFooter && dt.nTFoot !== null )
{
for (i = 0, rowCount = dt.nTFoot.rows.length; i < rowCount; i++) {
aRow = [];
var col = 0;
for ( j=0, iLen=dt.aoColumns.length ; j/g, "");
sLoopData = this._fnHtmlDecode( sLoopData );
aRow.push( this._fnBoundData( sLoopData, oConfig.sFieldBoundary, regex ) );
col ++;
} else {
}
}
}
aData.push( aRow.join(oConfig.sFieldSeperator) );
}
}
_sLastData = aData.join( this._fnNewline(oConfig) );
return _sLastData;
},