2 ms·
So will this let me make a csv file in JavaScript and actually then let the user download it as a file? That would really simplify a lot of my workflows instea
by mrfusion 12y ago
So will this let me make a csv file in JavaScript and actually then let the user download it as a file?
That would really simplify a lot of my workflows instead of having to make separate csv and HTML views I django.
- knrz 12y agoThis'll return a CSV based off of a JavaScript array of objects (or arrays). You'll have to find something else to allow the user to download a .csv, since that's out of the use-case this was designed for.
- batuhanicoz 12y agoYou could create a download file, but only in newer browsers. We have an internal application which requires CSV export, we use something like this: csv = cleanTurkishChars(makeCSV(data)); csv = 'data:application/csv;charset=utf-8,' + encodeURIComponent(csv); $("#csvexport").attr({ 'href': csv, 'target': '_blank' });
- mrfusion 12y agoThanks! Any idea where I can read more about it? What browsers support it? Are there file size limitations?