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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Extract col(B) vs col (A) from another worksheet
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Gandi

USA
Posts

Posted - 12/22/2011 :  8:06:28 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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)

Penn

China
644 Posts

Posted - 12/25/2011 :  10:35:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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





Penn
Go to Top of Page

Gandi

USA
Posts

Posted - 01/09/2012 :  2:27:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Great, thanks!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000