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
 multiple import + calculation for each file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thornvenom

Germany
Posts

Posted - 07/17/2009 :  03:12:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.8 and Service Release 5
Operating System:Win XP Pro

Hi @ all,

i want to import multiple ASCII files into a book like this:

newbook name:="measure" sheet:=0;
newsheet cols:=5 label:="1|2|3|force|time";

1,2,3 will be changed while importing - to measure1 [mV/V], ...2 [mV], ...3 [...]

multiple import works with:

string path$ = c:\datacd path$;
findFiles ext:=s*.txt;
impASC

calculation for each importet file:

col(b)=col(b)-col(b)[1];
col(d)=col(b)/20;

my problems:
1. importfilter options: wrong numericseparator - i need 1000,0, but i get 1,000.0
2. only the book with first imported file has the right structure with [measure1|measure2|...]
3. calculation only works in the book with last importet file, in the others nothing is calculated

Thanx
Thorn

easwar

USA
1965 Posts

Posted - 07/20/2009 :  11:34:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Thorn,

It may work better if you use the Import Wizard instead. With the Import Wizard, you can walk thru one of your files in the GUI. There are options for numeric separator on Data Columns page of the wizard. Plus at the very end where you can save a filter file with your desired settings, you can check the Advanced Settings check box. This will give an additional page where you can put LabTalk script to be run at the end of the import which can take care of your post-import data manipulation.

Then once the import filter (.OIF) file is saved (it can be in same folder as data, or in your UFF filters subfolder...), you can then use impFile X-Function where you can specify name and location of the filter to be used to import your multiple files.

Easwar
OriginLab


[/quote]
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