i need to export datatable into excel csv file. But when im exporting the table, the excel data comes with HTML tags like , tags or whaterver inside the datatable. its actually a opensource project called 'leantime' from github. I tried a lot. but i can't find anything related to this issue. Below mentioned example will be the column data if i export a file.
<a class="ticketModal" href="http://localhost/pmt/tickets/showTicket/20#subtasks">test task - TEST ASSIGNER | Plan Hrs:2 | Hrs Left: 4</a>
Check the javascript code, & suggest me a code to strip html tags
DataTable.ext.buttons.csvHtml5 = {
bom: !1,
className: "buttons-csv buttons-html5",
available: function() {
return window.FileReader !== undefined && window.Blob
},
text: function(dt) {
return dt.i18n("buttons.csv", "CSV")
},
action: function(e, dt, button, config) {
this.processing(!0);
var output = _exportData(dt, config).str,
info = dt.buttons.exportInfo(config),
charset = config.charset;
config.customize && (output = config.customize(output, config, dt)), charset = !1 !== charset ? (charset = charset || document.characterSet || document.charset) && ";charset=" + charset : "", config.bom && (output = String.fromCharCode(65279) + output), _saveAs(new Blob([output], {
type: "text/csv" + charset
}), info.filename, !0), this.processing(!1)
},
filename: "*",
extension: ".csv",
exportOptions: {
},
fieldSeparator: ",",
fieldBoundary: '"',
escapeChar: '"',
charset: null,
header: !0,
footer: !1
}
I want my exported csv file contains only a plain data (without html tags). Give me idea to change code to prevent html tags from the file