Hi,
Not sure if I understand your question fully.
Let me take a simple example to illustrate:
There are some workbooks in a folder and some worksheets in every workbook. In each worksheet, there are three columns: col(A), col(B) and col(C).
Now we want to calculate col(A)*col(C) for every worksheets and put the result in a new created column col(D), we can run the scripts below in Script Window:
// Loop over all Workbooks ...
// Restricted to the current Project Explorer Folder View
doc -ef W
{
// Loop over all worksheets in each workbook
loop(ii,1,page.nlayers)
{
range rW = [%H]$(ii)!;
rW.addCol(Result);
newColIndex = rw.nCols;
range rA = [%H]$(ii)!col(1);
range rB = [%H]$(ii)!col(3);
range rR = [%H]$(ii)!col($(newColIndex));
rR = rA * rB;
}
}
If you want to know more about how to loop Origin object, you can refer to:
http://www.originlab.com/doc/LabTalk/guide/Looping-Over-objs
Or you can try X-function in this case:
doc -ef W
{
doc -e LW
{
vmathtool -r 2 ix1:=1 operator:=mul operand:=data ix2:=3 ox:=<new>;
}
}
More details about vmathtool can be found here:
http://www.originlab.com/doc/X-Function/ref/vmathtool
Hope it helps!
Regard,
Yuki
OriginLab