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 <td> in them, in that case the data is not written in proper format (since it assumes that the <td> 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 <TD> 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 <td> in them, in that case the data is not written in proper format (since it assumes that the <td> 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 <TD> of just the datatables column and not other td's?
Thanks,
Barani