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
 Origin Forum
 expASC - using long name as path?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

RiverFalls

USA
33 Posts

Posted - 02/16/2015 :  11:24:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2015
Operating System: Win 7

The summary question: I would like to use the expASC command function to export a selected column to a file - but without having to type a new path each time.

The details: I have a worksheet with 1200 columns, and I need to be able to export every other one to a separate file. I can do this by selecting the column and using expASC in the command window:

expASC type:=text path:="c:\...\name_00001" select:=1 separator:=tab longname:=0 units:=0 missing:=0;

I don't want to have to change the file name (actually just the number at the end of the filename) in the file path each time. Is there a way to have expASC pull the path or part of the path from the long name of the column? I suppose that there might also be a way to use OriginC to export specific columns to separate files...

Thank you for any help you can provide,
Lowell

Echo_Chu

China
Posts

Posted - 02/17/2015 :  03:59:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Lowell

Please see whether the scripts below works for you.


range aa=%C;
%A = aa.lname$;
expASC type:=text path:=D:\test\%A select:=1 separator:=tab longname:=0 units:=0 missing:=0; 


where D:\test\ is path and %A is the long name of selected columns

Echo
Originlab
Go to Top of Page

RiverFalls

USA
33 Posts

Posted - 02/17/2015 :  08:51:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Echo,
Thank you, that works beautifully. I've put the script into a programming control button and now only need one click to export!

Where can I find more about the 'range' options and identifiers like 'lname$'? Searching Origin Help doesn't lead me anywhere.
Lowell
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 02/20/2015 :  12:38:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I think this page is the most complete on range,

http://www.originlab.com/doc/LabTalk/guide/Range-Notation

but you are right, even on this page, there was no mention of the lname$ property.


Basically, when you define a column range, then you can access to all the column properties, like to set range aa to column A, and see a list by

range aa=1;
aa.=;


and these properties are listed on wks.col object level:

http://www.originlab.com/doc/LabTalk/ref/Wks-Col-obj


CP
Go to Top of Page

RiverFalls

USA
33 Posts

Posted - 02/20/2015 :  2:40:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you.
Lowell
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