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