Export to CSV ignores <> characters.
Export to CSV ignores <> characters.
maruthikumar80
Posts: 5Questions: 2Answers: 0
Hello All,
When I export data from Datatable to csv format, it ignores < > characters.
For instance if the cell value is <>Maruthi, after exporting to csv it prints only Maruthi
Can anyone help me how to resolve this?
Regards,
Maruthi Kumar
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @maruthikumar80 ,
I just tried it here, and it's working fine for me. Could you modify that example please so that it demonstrates your problem,
Cheers,
Colin
Disable the stripping of HTML using the
stripHtml
option of the export button options (csvHtml5
). The regex used for the stripping of HTML is overly simple and will just remove<>
and anything between them.Allan
Thank you, Allan. Now it is working. As you suggested I changed the option.
extend: 'csvHtml5',
exportOptions: {
columns: ':visible',
stripHtml : false
}
Regards,
Maruthi Kumar