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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Select a column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

lucio_marianna

Germany
Posts

Posted - 01/24/2006 :  08:55:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Laurie

USA
404 Posts

Posted - 02/20/2006 :  10:00:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000