@allan
Hy Allan i'm using Following Libraries:
DataTables 1.10.16, Buttons 1.4.2, Column visibility 1.4.2, Flash export 1.4.2, HTML5 export 1.4.2, Print view 1.4.2, ColReorder 1.4.1, Select 1.2.3. etc.
I'v got the same Problem with the stripping of Special Characters for the Excel Export Buttons.
After trying your latest fix for this Problem with the "stripHtml : false" Options it seems that this Option doesn´t work me unfortunately....
Do you have any other Solutions for this Problem except an manual replace for every affected Special Char ?
I'm having part of the html show in the Excel export. Here is a link to the table ->click on the Authors tab on the left and then click the Excel export button.
In Excel, when I scroll about a third of the way down (row 1082), I begin to see entries like this: Career Publications: N/A"" class=""simple-tooltip"">YOUSSEF, CAROLYN M.
I think I'm using the latest versions of everything.
Thanks tangerine - I only showed a snippet. Here is the whole row. You could visit the page if you're interested in the whole table. The snippet is inside of a title attribute and the whole thing is in quotes. I'm no html guru so let me know if this is incorrect.
Thanks tangerine. You helped put me on the right track. From another post, I found that using a <br> tag within the title tag was the issue. Removing the <br> tag gives me a clean Excel export.
Answers
Thank you. Had the same issue, disabling the stripHtml solved it:
@allan
Hy Allan i'm using Following Libraries:
DataTables 1.10.16, Buttons 1.4.2, Column visibility 1.4.2, Flash export 1.4.2, HTML5 export 1.4.2, Print view 1.4.2, ColReorder 1.4.1, Select 1.2.3. etc.
I'v got the same Problem with the stripping of Special Characters for the Excel Export Buttons.
After trying your latest fix for this Problem with the "stripHtml : false" Options it seems that this Option doesn´t work me unfortunately....
Do you have any other Solutions for this Problem except an manual replace for every affected Special Char ?
Thank you in advanced
Can you link to a page showing the issue please?
Allan
@allan
{
extend : 'excel',
exportOptions : {
stripHtml : false,
modifier : {
selected : true
},
//Export only visible Data
columns: ':visible:not(:first-child)',
format: {
//Format Export Data to keep seperator
body: function(data, row, column, node) {
var href;
try {
var $href = $(data);
href = $href.attr('href');
} catch(error){};
data = (typeof href != 'undefined' && href.search(/.pdf$/) > 0) ? href.slice(href.lastIndexOf('/') + 1) : data;
return $.isNumeric(data.replace(',', '.')) ? data.replace(',', '.') : data.replace(/<([^>]+)>/ig, "");
}
}
},
className : 'btn btn-default btn-xs',
text : '<i class="fa fa-fw fa-download"></i> als Excel exportieren'
},
After Exporting to Excel and opening the Requested File the "&" is replaced by "&"
....& is replaced by & amp ;
Have the exact issue with both excel and pdf export, did you find a solution @mabs ?
I'm having part of the html show in the Excel export. Here is a link to the table ->click on the Authors tab on the left and then click the Excel export button.
In Excel, when I scroll about a third of the way down (row 1082), I begin to see entries like this: Career Publications: N/A"" class=""simple-tooltip"">YOUSSEF, CAROLYN M.
I think I'm using the latest versions of everything.
The HTML in your data is badly formed.
That closing tag has no corresponding opening tag.
Thanks tangerine - I only showed a snippet. Here is the whole row. You could visit the page if you're interested in the whole table. The snippet is inside of a title attribute and the whole thing is in quotes. I'm no html guru so let me know if this is incorrect.
There is a newline after the <br> in the span title. I thought maybe this was causing the issue, but I get the same error with or without the newline.
I visited your page, checked your data, and gave you the answer.
Run your page through a HTML validator if you want a second opinion.
Thanks tangerine. You helped put me on the right track. From another post, I found that using a <br> tag within the title tag was the issue. Removing the <br> tag gives me a clean Excel export.