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
 Getting the number of workbooks ina project

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 - 10/05/2012 : 2:53:41 PM
Hi all,
Can somebody point out to me the labtalk script for obtaining the number pf workbooks in a particular project?
Thank You

Origin Ver8.0 and Service Release (Select Help-->About Origin):
Operating System:
2   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 10/08/2012 : 08:51:10 AM
here is the basic setup for looping over all workbooks in a project, all worksheets (layers) in each workbook and all columns in each worksheet:

// for each workbook
doc -e w
{
// next workbook is temporarily active
loop(ii,1,page.nlayers)
{
// make next worksheet active
page.active = ii;
// for each column
loop(jj,1,wks.ncols)
{
stats $(jj);
ty mean of sheet [%h]%(layer.name$), column %(wks.col$(jj).name$) is $(stats.mean);
}
}
}

type stats.= in script or command window to see all stats values that are calculated.
thentangler Posted - 10/05/2012 : 3:14:02 PM
I am actually trying to perform statistics on the columns of each worksheet in each workbook in my Originfile.
Is there a way to make each worksheet active and then to the statistics, and move on the to the next worksheet and so on?
I can get the number of worksheets using page.nLayers, but how do I incorporate them in a for loop to perform my calculations?

Sorry I tried editing the topic but it did not allow me.
Thanks in advance for the help

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