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
 Loop - Column distribution to new worksheets

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
cyantist Posted - 02/25/2010 : 10:11:09 PM
Origin Ver. and Service Release (Select Help-->About Origin): 7.5
Operating System: WinXP

Is there a way I can loop the following tasks to automate copying designated columns into pre-created worksheets:
(where main worksheets are WS1 up to WS15, and pre-created worksheets are G01 up to G15)

%(G01,3)=%(WS1,2); // copies data1/col2 to newdata1/col3
%(G01,4)=%(WS1,50); // copies data1/col4 to newdata2/col1
%(G01,5)=%(WS1,18);
%(G01,6)=%(WS1,66);
%(G01,7)=%(WS1,34);
%(G01,8)=%(WS1,82);

window -a G01; // make G01 active window
mark -d G01_1 -b 1 -e 4; // delete first 4 cols in G01


%(G02,3)=%(WS1,3);
%(G02,4)=%(WS1,51);
%(G02,5)=%(WS1,19);
%(G02,6)=%(WS1,67);
%(G02,7)=%(WS1,35);
%(G02,8)=%(WS1,83);

window -a G01; // make G01 active window
mark -d G01_1 -b 1 -e 4; // delete first 4 cols in G01

...and so on, until G15. Then repeat for WS2 (but with different column designations in G), and so on until WS15.

I'm a total noob in automating Origin and programming in general, but I'm learning as I go along. I'll try to post any solutions I find.

Thanks!
1   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 02/26/2010 : 6:08:14 PM
You could do something like the following:
index1=2;
index2=50;
index3=18;
index4=66;
index5=34;
index6=82;
loop(ii,1,15){
%(G0$(ii),3)=%(WS1,index1);
%(G0$(ii),4)=%(WS1,index2);
%(G0$(ii),5)=%(WS1,index3);
%(G0$(ii),6)=%(WS1,index4);
%(G0$(ii),7)=%(WS1,index5);
%(G0$(ii),8)=%(WS1,index6);
index1++;
index2++;
index3++;
index4++;
index5++;
index6++;
}

OriginLab Technical Support

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