Export multiple footer rows
Export multiple footer rows
cmivey
Posts: 1Questions: 0Answers: 0
I have multiple footer rows in my datatable, however when exporting them it only exports the last row. I'm trying to export all of the rows and I modified the Footer section of the TableTools.js file as stated in another thread to the below section, however it doesn't export all the rows. Any ideas?
if (oConfig.bFooter && dt.nTFoot !== null) {
//another loop
for (i = 0; rowCount = dt.nTFoot.rows.length; i < rowCount; i++) {
aRow = []; //clear row data
for (j = 0, iLen = dt.aoColumns.length; j < iLen; j++) {
if (aColumnsInc[j]) {
if (dt.nTFoot.rows[i].children[j] !== null) {
sLoopData = dt.nTFoot.rows[i].children[j].innerHTML.replace(/\n/g, " ").replace(/<.*?>/g, "");
sLoopData = this._fnHtmlDecode(sLoopData);
aRow.push(this._fnBoundData(sLoopData, oConfig.sFieldBoundary, regex));
} else {
//here we should add empty element to row so every row has the same length
}
}
}
aData.push(aRow.join(oConfig.sFieldSeperator));
}
}
Thanks,
if (oConfig.bFooter && dt.nTFoot !== null) {
//another loop
for (i = 0; rowCount = dt.nTFoot.rows.length; i < rowCount; i++) {
aRow = []; //clear row data
for (j = 0, iLen = dt.aoColumns.length; j < iLen; j++) {
if (aColumnsInc[j]) {
if (dt.nTFoot.rows[i].children[j] !== null) {
sLoopData = dt.nTFoot.rows[i].children[j].innerHTML.replace(/\n/g, " ").replace(/<.*?>/g, "");
sLoopData = this._fnHtmlDecode(sLoopData);
aRow.push(this._fnBoundData(sLoopData, oConfig.sFieldBoundary, regex));
} else {
//here we should add empty element to row so every row has the same length
}
}
}
aData.push(aRow.join(oConfig.sFieldSeperator));
}
}
Thanks,
This discussion has been closed.