How to ignore td inside column when exporting the data manually?
How to ignore td inside column when exporting the data manually?
bbarani
Posts: 32Questions: 0Answers: 0
Hi,
I have a function that opens a excel application and populated the excel with the data present in datatables. Everything works fine until the data contains in them, in that case the data is not written in proper format (since it assumes that the present inside the column data is a datatable column).
This is the function I use to create a excel document.
$(dTable.fnSettings().aoData).each(function () {
$(this.nTr).each(function (c) {
var nTds = $('td', this);
for (var j = 0; j < nTds.length; j++) {
excel.ActiveSheet.Cells(i + 3, j + 1).Value = $(nTds[j]).text();
};
i = i + 1;
});
Is there a way to get of just the datatables column and not other td's?
Thanks,
Barani
I have a function that opens a excel application and populated the excel with the data present in datatables. Everything works fine until the data contains in them, in that case the data is not written in proper format (since it assumes that the present inside the column data is a datatable column).
This is the function I use to create a excel document.
$(dTable.fnSettings().aoData).each(function () {
$(this.nTr).each(function (c) {
var nTds = $('td', this);
for (var j = 0; j < nTds.length; j++) {
excel.ActiveSheet.Cells(i + 3, j + 1).Value = $(nTds[j]).text();
};
i = i + 1;
});
Is there a way to get of just the datatables column and not other td's?
Thanks,
Barani
This discussion has been closed.