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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 multiple import + calculation for each file

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
thornvenom Posted - 07/17/2009 : 03:12:06 AM
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

1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 07/20/2009 : 11:34:59 AM
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]

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000