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
 Origin Forum
 help with simple script please

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
rosei09 Posted - 11/21/2009 : 9:25:07 PM
I am a long time user of Origin (now using ver 8) but am unfamiliar with scripts (or LabTalk, or C++, or etc). Could someone do me the great favor of writing for me a very simple script (that I can paste into the "worksheet script" box). All I want to do is take all the values in column A and multiply them by a number (such as 3.5), all the values in column B and multiply them by the SAME number, and so on for every column in the worksheet. (I don't want to normalize the columns, just do the same simple multiplication on all the values in every column.) Each column has 1024 values, if you need to know this.

Obviously I know I can do this for a single column by right-clicking on it and using the arithmetic under "set column values" But, obviously, I don't want to do this 100+ times over individually for 100+ columns in my worksheet. It's got to be a trivial script, isn't it?

Thank you for your help,
rosei
3   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 11/22/2009 : 8:09:31 PM
not embarrassing at all, and many others would benifit from your question, as for a new Origin user, the initial questions are often about very simple task but not knowing where to get started.

CP
rosei09 Posted - 11/22/2009 : 7:53:38 PM

Thank you! (How embarrassing to ask for something so simple.)
cpyang Posted - 11/22/2009 : 08:15:56 AM
Here


loop(i,1,wks.ncols) {wcol(i)*=3.5;}


You can read more here

http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Manipulating_Worksheet_Columns

CP

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