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 for Programming
 LabTalk Forum
 How to add a column only to specified sheets?

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
Noname123 Posted - 03/31/2022 : 03:40:23 AM
I'd like to add a column that is a function of another column, but only to specified worksheets in specified workbooks. Here is the code:
doc -ef W {
doc -e LW { (if(%H == "J10aX" || %H == "J11aX" || %H == "J12aX" 
|| %H == "J13aX"  ||  %H == "J14aX" ||  %H == "J15aX" ||  %H == "J16aX" || %H == "J17aX"
|| %H == "J18aX");

{ if(wks.name$=="mixed"){
// Add a column
wks.addcol();
// get index of added column
int ncols = wks.ncols;
// set value of this new col
wcol(ncols) = Col(D) * 0.005}}
}};


This code doesn't work. Can someone point out my mistake?

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