I generate and download a CSV from a webpage using javascript in the browser side (chrome windows)
function toCsv(arr){
return arr.reduce(function(csvString, row){
csvString += row.join(',') ;
csvString += "\r\n"; //";";//"\n";
return csvString;
}, '');
}
function flowDataCsv(){
document.location = 'data:Application/octet-stream,' + toCsv(flowDataGrid);
}
i have tried delimiting lines with ";", "\r\n" and "\n" but all three results in csv:s that excel imports into one line instead of as a grid. How should i terminate the lines to get excel to recognize it as a line ending and start inserting data on a new line?