Data is broken if csv file contain a # value when i try to export csv data in vuejs.here is my code.Is it any encoding problem??
download_csv(){
var date = new Date();
var hiddenElement = document.createElement('a');
hiddenElement.href = 'data:text/csv;charset=utf-8,%EF%BB%BF' + encodeURI(this.CSVlogs);
hiddenElement.target = '_blank';
var today = moment(date).format('YYYY-MM-DD');
hiddenElement.download = 'CWORK USERLIST_' + today + '.csv';
hiddenElement.click();
},
you just need to pass the proper data to csv content
this code works for me