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
 Origin Forum
 Link 2 columns in 2 sheets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

flirt

USA
Posts

Posted - 06/02/2010 :  08:57:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR3
Operating System: winxp

I tried to link 2 columns in 2 sheets by set column values as: [Book1]Sheet2!col(D)
but get something like: [BOOK1]SHEET2!Book1_D@9: object property not found!
Math cannot be performed on Text column: [BOOK1]POROSITY0_BK1!Book1_D@9

Anybody know how to solve this?
Thanks.

VincentLiu

China
Posts

Posted - 06/03/2010 :  02:00:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You should first define a range variable in the Before Formula Scripts panel and then assign the variable to another column. The following is an example.



Best regards,
Vincent
OriginLab Technical Services
Go to Top of Page

flirt

USA
Posts

Posted - 06/03/2010 :  09:22:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
wooow, that really helps. Thank you.
Go to Top of Page

flirt

USA
Posts

Posted - 06/03/2010 :  09:54:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Two more questions:
If i refer to a cell in another sheet using the method you recommend, it doesn't work:

second, if i change something (e.g., the sheet name), should i manually change this name used in all scripts?

The language Origin uses is quite complicated. Is there a simple tutorial? I know help includes everything but it is still too complicated for general users like me.
Many thanks.
Go to Top of Page

VincentLiu

China
Posts

Posted - 06/03/2010 :  10:27:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To the 1st question:

You should use "Range" keyword to define a range variable, but not use "double" keyword. So the variable should be range E1 = [Book1]Modulus!col(B)[1]. For more details about range definition, please refer to

http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Range_Notation

To the 2nd question:

Of course, you should change the name of a sheet used in all scripts like other programming languages do. For LabTalk is a high-level, full-featured programming language which can easily access to most of Origin's operation with a simple command, I suggest you to get start with the LabTalk User Guide to get a full view of it. It is a example based guide, so you could easily understand the language with it.

http://wiki.originlab.com/~originla/wiki/index.php?title=Category:LT_Guide

If you have any question about Origin, you could send it through

http://www.originlab.com/www/company/qform.aspx?s=1&

Vincent
OriginLab Technical Services

Edited by - VincentLiu on 06/03/2010 10:28:41 PM
Go to Top of Page

flirt

USA
Posts

Posted - 06/04/2010 :  4:51:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I tried your method but it doesn't work, so I spent some time to read help and finally found a solution. To refer only one cell in another sheet, first define a range in the "before script" window, then refer to cell in script window use E1(1), E1(2) etc. Strangely, E1[1], E1[2] doesnot work.

quote:
Originally posted by VincentLiu

To the 1st question:

You should use "Range" keyword to define a range variable, but not use "double" keyword. So the variable should be range E1 = [Book1]Modulus!col(B)[1]. For more details about range definition, please refer to

http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Range_Notation

To the 2nd question:

Of course, you should change the name of a sheet used in all scripts like other programming languages do. For LabTalk is a high-level, full-featured programming language which can easily access to most of Origin's operation with a simple command, I suggest you to get start with the LabTalk User Guide to get a full view of it. It is a example based guide, so you could easily understand the language with it.

http://wiki.originlab.com/~originla/wiki/index.php?title=Category:LT_Guide

If you have any question about Origin, you could send it through

http://www.originlab.com/www/company/qform.aspx?s=1&

Vincent
OriginLab Technical Services


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