Converting breaks to new lines when exporting to excel (and other)
Converting breaks to new lines when exporting to excel (and other)
I am trying to export my table to excel format, but wish to convert html breaks <br/> to new lines in the output.
I've seen this thread https://datatables.net/forums/discussion/12590/when-exporting-to-xls-csv (and similar) , but they are pre 1.10 and all my efforts to do the same in 1.10+ using exportData have been futile. I've also looked at the pre 1.10 to 1.10+ conversion guide, but still without any success.
My setup
buttons: [
{
extend: 'excelHtml5',
text: '<i class="fa fa-file-excel-o"></i> Export to Excel',
exportData : { WHAT DO I PUT HERE TO CONVERT BREAKS TO NEW LINES ? }
}
],
Can someone help me with a working example on how this is accomplished in 1.10+