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
 Select a column

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
lucio_marianna Posted - 01/24/2006 : 08:55:43 AM
Origin Version (Select Help-->About Origin): 7.5
Operating System: XP

Hi,
I would like to select every worksheet in a layer, and save each of them in one worksheet. My problem is also add at new worksheet only the second column of every wks read from the layer.

Thanks in advance for the help!!!

Marianna
1   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 02/20/2006 : 10:00:45 AM
Not sure if this is exactly what you want....but maybe you can take from this and modify it.

The following code should be executed when the graph is active:

%P=%H; //store name of plot in %P
win -t data origin; //create worksheet to hold data
//add a column for each layer in the plot, minus the 1 Y column already in the worksheet
worksheet -a %P!page.nlayers-1;
%W=%H; //store name of the worksheet in %W
win -a %P; //make plot active
//run the following code for all layers in the plot
doc -e LW {
copy %(1,@D) %(%W,page.active+1); //copy the first dataset plotted
}

The above code will copy the first dataset plotted in each layer, to a new worksheet.

When the new worksheet is created it will have two columns: A(X) and B(Y). The Y data from layer1 will get copied into B(Y), column 2. The Y data from layer2 will get copied into column 3, etc.

The A(X) column will be empty after the script runs. The script does not copy any X data, although it could easily be modifed to do so.

OriginLab Technical Support

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