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
 Origin Forum
 Exporting data from multiple worksheets to another
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bvg15

6 Posts

Posted - 06/19/2016 :  11:49:25 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8
Operating System: Win7

Hello,

I would appreciate if you could help me with the following: I have 30 books, each book has 4 worksheets, each worksheet has 3 columns. I need to extract the 3rd column of each worksheet into a new worksheet #5 in the same book such that the new worksheet now contains the imported 4 columns. I also need to do the same for the 2nd column for the 4 main worksheets and extract the data to a new worksheet #6. I want to find the mean and standard deviation (extracted to two other columns within the worksheet)for the 4 columns in both worksheets #5 and #6. Then, I need to extract the mean and st dev from worksheets #5 and #6 to a new worksheet #7 so I can plot one as a function of the other. The mean and st dev of the 3rd column in the original 4 worksheets will be the x value while the 2nd column will be the Y value in worksheet #7. Is it possible to loop this for all 30 books at the same time?

Thank you so much for any input. I really appreciate it.

Shirley_GZ

China
Posts

Posted - 06/20/2016 :  02:08:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Bvg15,

Please try the sample script below:


doc -e W
{
newsheet col:=4; //add Sheet #5
loop(ii,1,4)
{
	range rS = $(ii)!3;
	range rN = 5!$(ii);
	rN = rS;
}
colstats irng:=1:4 col:=<optional> n:=<optional> median:=<optional>;
newsheet col:=4; //add Sheet #6
loop(ii,1,4)
{
	range rS = $(ii)!2;
	range rN = 6!$(ii);
	rN = rS;
}
colstats irng:=1:4 col:=<optional> n:=<optional> median:=<optional>;
}


please refer to these help page:
http://www.originlab.com/doc/LabTalk/ref/Document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects

http://www.originlab.com/doc/X-Function/ref/colstats

To do further processing, please refer to the relative LabTalk script example under this category:
http://www.originlab.com/doc/LabTalk/examples

In addition, Origin 8 has been released long time ago, we won't fully support it any more, please consider upgrade your Origin to our current version, 2016 SR2.
Here is the demo version,
http://www.originlab.com/demodownload.aspx

Thanks,
Shirley



Originlab Technical Service Team
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