| 
        
          | 
              
                | 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
  |  |  
 |