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
 Only divide Y columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Fulerena

Spain
7 Posts

Posted - 03/11/2016 :  05:55:40 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Edited by - Fulerena on 03/11/2016 06:22:01 AM

jasonzhao

China
262 Posts

Posted - 03/14/2016 :  03:53:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - jasonzhao on 03/14/2016 04:33:34 AM
Go to Top of Page

Fulerena

Spain
7 Posts

Posted - 03/14/2016 :  06:26:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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



Go to Top of Page

jasonzhao

China
262 Posts

Posted - 03/15/2016 :  05:52:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - jasonzhao on 03/15/2016 05:58:36 AM
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