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