Reputation: 61
How to download csv file using jquery ? I have group of records into jquery , so i need to export to csv and download using jquery .
Suggestions please..
Upvotes: 1
Views: 2886
Reputation: 66191
OK, so there are (at least) three ways to download files:
Since you said you have the CSV in jQuery (I assume you mean JavaScript) here I would suggest you look into the library I wrote, Downloadify, for use in situations like this. The Demo page or documentation should be able to get you going.
Downloadify is a JavaScript interface for the Flash 10 feature. As with any technology, I suggest you also implement a variation fallback on the server for users w/o Flash 10.
Upvotes: 2
Reputation: 33571
jQuery cannot create a downloadable file. You need to do this server side. You can use a language like PHP or you can try putting jQuery on the server through one of the server side JS implementations.
Upvotes: 0