How to replace my data with data-attribute.
How to replace my data with data-attribute.
nomad_ch
Posts: 2Questions: 1Answers: 0
Hi!
I need to replace all data from B row.
Data is taken from <td data-value="wanted string">string</td>
How to replace "string" to "wanted string" (from data-value) ?
extend: 'excelHtml5',
text: 'Excel',
customize: function ( xlsx ) {
var sheet = xlsx.xl.worksheets['sheet1.xml'];
$('row c[r^="B"]', sheet).each( function () {
what need to write here?
});
}
thanks.
Answers
This thread may help, it's showing how to change values in the XLS file : https://datatables.net/forums/discussion/75877/how-to-replace-my-data-with-data-attribute#latest
Colin
Hi, thanks, but you give wrong link (to my thread).
Now i make like this (but its bad, because i dont have current td (like $(this)).
Probably better to use the data formatting function to get the data to export. The
customize
function is for modifying the Excel file.Allan