How Do I Dump the Current View to a Text File in HTML, XML or Simple Delimited Format? (Magic xpa 3.x)
You can use the DataViewTo functions to export your current Data view to a text file. There are three different DataView functions, each of which is explained in its own section:
Alternatively, you can allow the end user to dynamically export their current data view without doing any specific programming: see How Do I Allow the End User to Dynamically Export Data?.
How Do I Dynamically Export the Dataview of a Task into an XML, HTML, Text, or CSV file?
How Do I Create Tasks that Dump Data Records Into Flat Text Files and Vice Versa?
The Online and Rich Client Samples projects (program RP02 and RRP02)