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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Manipulating worksheets

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
thentangler Posted - 08/15/2010 : 12:09:21 PM
Origin Ver. 8.1 and Service Release 3
Operating System: Win 7

Hi,
I need help on accessing worksheets in my scripts.
For example, I have about 50 worksheets in my workbook (Book1) which are named from d1 to d50. And i want to pick out the value in cell(1,30) out from each of the worksheets and put them in a new worksheet so that I will have a column with 50 values in the new worksheet.
How do I do this in Labtalk. What are the syntaxes for accessing and manipulating worksheets in a workbook? I tried searching for it in the help file, but was not very successful. Id really appreciate any help.
thanks
3   L A T E S T    R E P L I E S    (Newest First)
AmandaLu Posted - 08/17/2010 : 03:16:33 AM
quote:


So which is the line which tells it to write to "newsheet"?



range bb=51!1; //this line define the range bb as the first column in the 51th sheet, which is the new worksheet
bb[$(ii)]=aa[1]; //this line tells it to copy the value in cell(1,30) in the iith sheet to the new worksheet

quote:

is $(ii)! taking the (1,30) value from the iith sheet?



Yes. In this line: range aa=$(ii)!30; we define range aa as the 30th column in the iith sheet.
thentangler Posted - 08/16/2010 : 11:47:07 PM
Hi Amanda,
Thank you so much for the reply.
So which is the line which tells it to write to "newsheet"?
is $(ii)! taking the (1,30) value from the iith sheet?
AmandaLu Posted - 08/16/2010 : 02:46:40 AM
Dear thentangler,

You can define a Range to accessing worksheets. For example, if you want to copy the values in cell(1,30) of every worksheet to a new sheet in Book1, please activate Book1 and run the following scripts:

newsheet;
for(ii=1;ii<=50;ii++)
{
range aa=$(ii)!30;
range bb=51!1;
bb[$(ii)]=aa[1];
}

For more information about Range, please refer to here.

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000