I'm exporting json files to csv using Filesaver.js and json-export-excel.js. The comma separator is causing the columns to shift when it sees a comma in the string.
Plunker Demo
How can i ignore commas found within string?
<button ng-json-export-excel data="data" report-fields="{name: 'Name', quote: 'Quote'}" filename ="'famousQuote'" separator="," class="purple_btn btn">Export to Excel</button>
JS File:
$scope.data = [
{
name: "Jane Austen",
quote: "It isn\'t what we say or think that defines us, but what we do.",
},
{
name: "Stephen King",
quote: "Quiet people have the loudest minds.",
},
]
Current CSV output (Not Desired): (Note: |
marks the columns in csv file)
Name Quote
Jane Austen | It isn't what we say or think that defines us| but what we do.|
Stephen King| Quiet people have the loudest minds. | |
Desired CSV output:
Name Quote
Jane Austen | It isn't what we say or think that defines us, but what we do.|
Stephen King| Quiet people have the loudest minds. |