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
 accessing colums in multiple sheets

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
Sell Posted - 01/30/2010 : 2:17:45 PM
Origin Ver.81 and Service Release SR1 (Select Help-->About Origin):
Operating System:XP

I have a couple of sheets with the same structure and would like to include all columns with the name, let's say ZX into a graph layer. I would like to use the layer.include() function. How can I loop through all the sheets and add from there the dataset in column ZX
4   L A T E S T    R E P L I E S    (Newest First)
Sell Posted - 02/01/2010 : 10:40:34 AM
Thank you both!
I never used the doc -e command. Very powerful! It is the solution for my problem. Completely unexpected. It remains the question on how to loop over a range or string array variable including substitution. But this has time until it goes beyond doc -e ;-)

Hans-Jürgen Sell
easwar Posted - 02/01/2010 : 10:30:07 AM
Hi,

As you are looking for a column with a specific shortname, you can use the colnum() function to check if index is non-zero to see if the column exists, such as with code below. Then you can get dataset to add to your graph, or use the plotxy x-function to plot to graph using range defined from the column etc.


// Loop over all sheets
doc -e LB {
	// Type out window name and sheet name 
	type "Book: %h, sheet: %(wks.name$)";
	// Check for column with specific short name
	int ii = colnum(ZX);
	if(ii != 0)
		type "   Column exists, index = $(ii)";
}

Sell Posted - 02/01/2010 : 03:52:09 AM
This fits not the need. The solution might be in a range or string array variable. But the question is how to loop through such variables. There is a nice example in the labtalk help:
range rs = [Book1]4:end!
But I could not found neither how to loop through this variable nor what is really stored in it.
larry_lan Posted - 01/31/2010 : 10:52:22 PM
Hi:

How about the doc -e command? For example:
doc -e l
{
	ty The active layer is in %H, layer $(page.active);
}

Thanks
Larry

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