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
 Only divide Y columns

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
Fulerena Posted - 03/11/2016 : 05:55:40 AM
Hi!!
I have Origin 2015 (64-bit) b9.2.257 in windows 7.
I normally have different sheets in a worksheet, and all my data are columns XYXYXY or XYYXYY. I always divide Y columns by the area, by a number. I normally "normalize" or use "set column value", but is complicated because I need to divide one by one or sheet by sheet. It´s possible to do it in another way. Divide all the Y columns of a worksheet or of a sheet?
Thanks
3   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 03/15/2016 : 05:52:46 AM
Hello,

You can loop through the sheet in this way:

doc -e lw
{
... ...
}

Please refer to this page for details:
http://www.originlab.com/doc/LabTalk/ref/Document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects

Best regards!
Jason
OriginLab Technical Service
Fulerena Posted - 03/14/2016 : 06:26:04 AM
It works perfect for a sheet.
Thanks!!!

But what I must change to use it for a worksheet with differents sheets?, if this is possible



jasonzhao Posted - 03/14/2016 : 03:53:17 AM
Hello,

You can run the LabTalk script to divide all the Y columns of a worksheet or of a sheet, please active the worksheet:

for(i=1;i<10;i++){  //loop through each column
wks.col = i;
if (wks.col.type!=1)  // if the column is not a Y column
continue;             //next loop
else
col($(i))=col($(i))*10; // if yes, multiplied by a constant
}


Best regards!
Jason
OriginLab Technical Service

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