The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Import files with a loop
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Nuubie

Switzerland
2 Posts

Posted - 03/10/2017 :  09:02:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello guys,

I am a complete beginner and I run into a problem. I want to import files with a loop. Namely,
loop(x,1,9) {
impasc fname=tablex.txt -t
}
So I have 9 table.txt files which i want to import. But it doesnt work. Can someone enlighten me please. Any help would be greatly appreciated

cpyang

USA
1406 Posts

Posted - 03/11/2017 :  11:59:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you multiple files, then they will need to be different names right? Assuming they are enumerated like table1.txt etc, then



loop(x,1,3){impasc fname:=c:\mydata\table$(x).txt options.impmode:=3}



You can google "originlab impasc" to read more. Or about $(x), "originlab labtalk substitution"

CP
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000