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
 Importing ASCII file using filter
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

k_fadz

France
11 Posts

Posted - 10/28/2017 :  11:11:42 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello ,

I want to import ASCII files with labtalk by using a filter I created. I looked on the internet but couldn't find a solution.

My ASCII files (3 types, I defined a filter (*.oif) for each type) are not simple to import (skip different columns, header lines to ignore ..) and I am not good with coding. That's why i defined a filter for each type and I want to import the files by using the filters in labtalk. Hope your answers will help me. Thank you in advance.

K.F

k_fadz

France
11 Posts

Posted - 10/29/2017 :  07:33:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I am using this code that Ipicked up from origin examples (I am not at all good with codes ) :

// Open a dialog for the user to select one or more files
dlgfile group:=*.* multi:=1;
// The filter file needs to be in the same folder as the data
impFile filtername:="filter1.oif" location:=data;


I want to enter the path of the filter (C:\Users\Tochiba_pc\Documents\OriginLab\2017\User Files\Filters\filter1.oif) in the code, so that it won't have to be in the same folder as the data. I guess it's simple to solve ...


K.F
Go to Top of Page

yuki_wu

896 Posts

Posted - 10/29/2017 :  11:30:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi K.F,

Sure. You can specify the path of the filter directly. For example:

impFile fname="C:\Sample.wav" filtername="C:\Program Files\Origin8\Filters\wav.oif";


More information can be found here:
http://www.originlab.com/doc/X-Function/ref/impFile

Regards,
Yuki
OriginLab

Edited by - yuki_wu on 10/29/2017 11:30:54 PM
Go to Top of Page

k_fadz

France
11 Posts

Posted - 10/30/2017 :  04:06:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much.

K.F
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