Do you mean saving the whole worksheet? I don't know what you want to save in the TXT file. However, the whole worksheet can be saved as an OGW, by calling a labtalk command
Layer lay = Project.ActiveLayer(); //We assume that the worksheet is the active layer
lay.LT_execute("save -i f:\\temp\\test2.ogw");
I hope this will help.
Deanna
OriginLab GZ Office