from array info to csv :
<script>
function downloadCsv() {
var data = arrCsvData;
var csvContent = "data:text/csv;charset=utf-8,";
data.forEach(function(infoArray, index) {
dataString = infoArray.join(",");
csvContent += index < data.length ? dataString + "
" : dataString;
});
var encodedUri = encodeURI(csvContent);
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("download", "my_data.csv");
link.click();
}
</script>
Similarly how can i export javascript json info to csv (on client side)??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…