Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
Gandi
Posted - 12/22/2011 : 8:06:28 PM I would like to extract data from several worksheets (of the same structure) in one workbook and save it in another worksheet/workbook. Each source worksheet consists of two columns: col(A) (=X) and col(B) (=Y). I would like to get the value of col(B) at a certain, fixed value of col(A), save this to the output worksheet, then get the next value from the following source worksheet, save it and so on. The fixed value (=X) might not be one of the values of col(A), i.e. interpolation would be required.
In principle this is easy; one can use col(B)(x), if the column designations are set accordingly. However, this only works for the active worksheet.
I have tried to use the range command, but from what I can see this only lets me access the value of col(B) at a certain index, but not the value of col(B) that corresponds to a random, fixed value of col(A). Hence my question is if there is a version of the col(B)(x) command that lets me specify in which workbook/worksheet this col(B) is to be found?
Any help is appreciated.
-- Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.5.0 SR1 Operating System: Win 7 (64 bit)
2 L A T E S T R E P L I E S (Newest First)
Gandi
Posted - 01/09/2012 : 2:27:23 PM Great, thanks!
Penn
Posted - 12/25/2011 : 10:35:40 PM Hi,
The range variable works fine. For example:
range r1 = [book1]sheet1!col(b); // col(b) range
r1(1.5) = ; // get value of col(b) at X=1.5, interpolation is performed here