Can some one please help me out in writing the sharepoint list items to a text file separated by the delimiter '|'. I need it in javascript or jquery as we are working on the cloud(office 365 sites). I am able to get the items using context.load. But not sure how to i write the resulted collection to a text file.
You need to use ActiveX objects, you can write to text or excel files using ActiveX objects. Check out the below code for text files. The below JavaScript function shows an example of the same.For excel different ActiveX object is used. function WriteFile() { var fso = new ActiveXObject("Scripting.FileSystemObject"); var fh = fso.CreateTextFile("c:\Test.txt", true); fh.WriteLine("Some text goes here..."); fh.Close(); } |
|||||||||
|
Iterate over all list items and collect the information.
And here is a example to export a csv file (you should use a csv instead)
|
|||
|