1

My below configuration will add double quotes for all the data, but I want to avoid double quotes for "Numbers" and "Date" type data, how can I do that.

   const universalBOM = "\uFEFF";
   const link = document.createElement("a");   

link.setAttribute("href", 'data:text/csv; charset=utf-8,' + encodeURIComponent(universalBOM + csvParser.unparse(newArr,{
  quotes: true,
  quoteChar: '"',
  escapeChar: '"',
  delimiter: ',',
  header: true,
  newline: '\r\n',
  skipEmptyLines: false,
  columns: null
})));
jake clark
  • 71
  • 6

0 Answers0