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
 export columns from different worksheets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

razva

Germany
Posts

Posted - 10/09/2005 :  6:33:18 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System:XP Prof

I have a script which uses doc -e W for making some calculus on hundreds of datasheets. In every datasheet there is only one column created by the script which holds the results I am interested in.
I want to make a script to take this column from all the workseets and copy the data into a new worksheet. Additionally, I need that all the new columns into the new workseet will have labels with the name of the worksheet they have been copied from.
I need this as I think Origin will be able to handle better and faster a project with only one worksheet (with some hundred columns)than it handles the present project with 5 hundred datasets.
How should I do this?
Thank you for your help.

Mike Buess

USA
3037 Posts

Posted - 10/10/2005 :  08:08:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Set the number of the column you want in the first line (cc)...

cc=2; // col #
win -t D; // new wks
%W=%H; // save name
del col(2); // remove Y col
nn=1;
doc -e W {
// skip if %H=%W
if("%H"!="%W") {
nn++;
%W!wks.addCol();
%W!wks.col$(nn).label$=%H;
copy %(%H,cc) %(%W,nn);
win -cd %H; // close wks ??
};
};
win -a %W; // activate %W
wks.labels(); // show col labels;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 10/10/2005 08:18:56 AM
Go to Top of Page

razva

Germany
Posts

Posted - 10/11/2005 :  5:46:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
great!
thank you Mike
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