Saving

Ok, I need help in saving data to a text file for example this tutorial shows how to load it but how would you save the data?

http://www.kirupa.com/developer/mx/externaldata.htm