A way to generate and download CSV files client-side
See original GitHub issueThere seems to be a lot of confusion about how to properly generate a file client-side and have it downloaded in modern browsers. I know how to do it (it’s not hard, but it uses a modern web API) and it could potentially be a valuable addition to the library.
Something like:
Papa.download(Papa.parse(csv), "data.json"); // download JSON file
Papa.download(Papa.unparse(data), "data.csv"); // download CSV file
Might take no more than about 20-30 lines of code. Should I do it?
Issue Analytics
- State:
- Created 9 years ago
- Reactions:5
- Comments:43 (9 by maintainers)
Top Results From Across the Web
How to export JavaScript array info to csv (on client side)?
You can do this in native JavaScript. You'll have to parse your data into correct CSV format as so (assuming you are using...
Read more >Generate CSV and Download it Client Side from the Browser
Sometimes you need to give people the ability to export CSVs. And sometimes you have all the data already in your ...
Read more >JavaScript create and download CSV file - Javatpoint
JavaScript create and download CSV file. CSV files are an essential part of computer science when you work with websites and databases.
Read more >How to create and download CSV - React client-side edition
How to create and download CSV - React client-side edition. Our customers always rely on Excel to dive deep into the data thus...
Read more >How to Generate a .CSV file on the client side and save it as ...
Hi, i try to allow the client to download the data he manipulated on the client side. But i have no idea how...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This seems to work in all modern browsers:
I used this for a project at my last work. If there’s no objection, I’ll be happy to build it into 4.2 or something.
For modern browsers solution goes like this, tested: IE11, FF & Chrome