Roland
Roland

Reputation: 181

Use Jquery to save into text file

Is there any method to use to save data from webpage to excel file or text file using jquery ?

Upvotes: 2

Views: 1534

Answers (1)

T.J. Crowder
T.J. Crowder

Reputation: 1075785

There's no purely client-side solution using only a browser and jQuery, no. You either have to involve a web server (and even then, the user has to handle the "save file" dialog box), or a "thick" technology like Flash or a signed Java applet. (In either case, the user would have to grant the permissions to do it; most users being somewhat — and appropriately — paranoid, you'd have to already have a relationship with them.) Even the new File API, which offers limited access to the local file system (with the user's permission), doesn't support writing files.

You can open a window with the file data in it, but then the user has to take the action of saving it to disk.

Upvotes: 2

Related Questions