Hi CU,
You can specify which template to use in the Import Multiple ASCII dialog. Check the "Import each file into a new worksheet" and a Template column will show up next to the File Name column. You can choose a different template for each data file if you want.
It's also straightforward to do what you want with LabTalk or Origin C scripts. Use fdlog.multiopen() to open the file selection dialog and fdlog.get(A,n) to assign the nth file to the string variable %A. Then you can use %[%A,>'.'] to find its extension and choose the template accordingly. Something like this...
fdlog.multiopen(); // count=number of files chosen
loop (ii,1,count)
{
fdlog.get(A,ii); %T=Origin;
if("%[%A,>'.']"=="d1") %T=d1;
if("%[%A,>'.']"=="d2") %T=d2;
if("%[%A,>'.']"=="d3") %T=d3;
win -t D %T; // open template
open -w %A; // import file to template
};
That help?
Mike Buess
Origin WebRing Member