Hi,
Let’s take an example. It is supposed that we have a workbook named Book1, and now we copy the second column in every sheet of Book1 to Book2:
win -a "Book1"; //Activate workbook, Book1
// Loop over all worksheets in Book1
loop(ii,1,page.nlayers)
{
range rW = [Book1]$(ii)!col(2);
// Copy the second column in the current worksheet to [Book2]Sheet1!
colcopy irng:=rW orng:=[Book2]Sheet1!col($(ii));
}
For the detailed explanation of the associated syntax, please refer to these help file pages:
http://www.originlab.com/doc/X-Function/ref/colcopy
http://www.originlab.com/doc/LabTalk/ref/Loop-cmd
http://www.originlab.com/doc/LabTalk/guide/Looping-Over-objs
Hope it helps.
Regards,
Yuki
OriginLab