T O P I C R E V I E W |
RSiertsema |
Posted - 07/02/2014 : 10:08:33 AM Origin Ver. and Service Release: 8.5.1 SR2 Operating System: win 7 pro
Hello Originlab!
I am looking for a script that will input numbers from workbook A, sheet 1, column 2 in the 'set column value' of the columns of workbook B. The trouble is that the amount of columns and numbers are variable (though always equal between them), so I need to use a loop.
My try has been the following:
loop(ii, 1, wks.ncols) { csetvalue formula:="[workbookA]1!2[$(ii)]*col($(ii))" col:=$(ii) recalculate:=1; }
Sadly this returns an error. Could you help me with this?
With kind regards,
Reinier |
1 L A T E S T R E P L I E S (Newest First) |
lkb0221 |
Posted - 07/02/2014 : 2:13:48 PM Hi,
Function body of SCV cannot recognize range string. You need to put it in the before formula part. And you need to use wcol instead of col for index. For example:
loop(ii, 1, wks.ncols) { csetvalue col:=$(ii) formula:="r1[$(ii)]*wcol($(ii))" script:="range r1 = [workbookA]1!2" recalculate:=1; }
Zheng OriginLab
|
|
|