Is there any method to use to save data from webpage to excel file or text file using jquery ?
Asked
Active
Viewed 1,496 times
1 Answers
2
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.

T.J. Crowder
- 1,031,962
- 187
- 1,923
- 1,875
-
I have got this page : http://jquery.tiddlywiki.org/twFile.html , is it ok to use it , i dont want to have heavy code , im not so good at coding ? – Roland Feb 24 '12 at 10:17
-
@rolandfeghaly: I'm not familiar with it, but note that it says it only works from local files (`file://` URIs). And it uses "thick" technologies (ActiveX, Java, etc.). – T.J. Crowder Feb 24 '12 at 10:29