Export options does not support the special characters.
Export options does not support the special characters.
puneet.jayee
Posts: 18Questions: 8Answers: 0
I have a datatable which has export options like PDF, Excel, CSV & Copy . It works perfectly fine unless there is a special character in one of the item in the datatable. Is there is any resolution which will ignore the special character during the export or can I have some API which will ignore this erros?
Thanks in advance!
This discussion has been closed.
Answers
It fails to export, if the any of cell value contains the single quote like John's Car
but it work if the value is Johns Car
They all seem to work in this example with a single quote:
http://live.datatables.net/nujuhalu/1/edit
Kevin
It fails with single quote when using the below piece of code-
extend:'copyHtml5',exportOptions: {format: {
body: function ( data, row, column, node ) {
if(column ===3)
{
return "";
}
else
{
return data;
}
}
}
},
Seems to work here:
http://live.datatables.net/nujuhalu/3/edit
Are you doing some column rendering that is adding the special characters?
In other words does the original data have the special characters?
The issue is related to your environment. Maybe you can update my example or provide a test case showing the issue.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin