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
 set column value with one sentence
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

phics

S. Korea
Posts

Posted - 11/12/2008 :  03:21:34 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi, everyone. I'm using 8.0SR4

In old version, I could set the value of a worksheet with one sentence

in Worksheet1,
"col(A) = Worksheet2_B + Worksheet2_C"
or
"Workshee1_A = Worksheet2_B + Worksheet2_C"

But in this version, I can't.
I could just understand the usage of range, as like,

range bb = [Book1]Worksheet2!col(B)
range cc = [Book1]Worksheet2!col(C)
col(A) = bb + cc

Can I reduce the above to one sentence ?

I expect "col(A) = [Book1]Worksheet2!col(B) + [Book1]Worksheet2!col(C)" works, but it doesn't.

It may be very happy if I can omit the name of workbook in same workbook.

Actually, why I want to write with "one sentence" is to record the sentence
in "Set Column Value" menu which is shown with right-clicking on column.


Thank you in advance.

VincentLiu

China
Posts

Posted - 11/14/2008 :  03:27:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When using Set Column Values, you can also use scripts to set values. But you need to input the scripts in the Before Formula Scripts box. It just like following image shows:



More details about this, please refer to

http://www.originlab.com/www/helponline/Origin8/en/managing_workbooks,_worksheets,_and_columns/using_formulae_to_set_or_transform_worksheet_column_values.htm

And please note, when you input multiple lines of script in the box, you need to add a colon at the end of each line, or the scripts will not be executed.

Best regards,
Vincent Liu
OriginLab Technical Services

Edited by - VincentLiu on 11/14/2008 03:28:41 AM
Go to Top of Page

phics

S. Korea
Posts

Posted - 11/15/2008 :  01:07:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Vincent,

Thank you for your advice.
I can understand it.

I have one more question, as I posted in "Origin C" forum like:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=7398

Can I change "Before Formula Script" with Origin C?

I couldn't find a function like "SetBeforeFormula".

Please tell me what it is, or how to make the function.


Best regards,

Hoyoung.

Go to Top of Page

thiago.maf

22 Posts

Posted - 06/14/2009 :  10:46:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Is that anyway via Labtalk to set column value?
I know that I can change values of cells but how to change the colum value string.

I can't find it.
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