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
 Few problems of scripting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Nirruob

France
4 Posts

Posted - 03/09/2011 :  08:17:27 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0 SR2
Operating System:Windows XP SP3
Hello,
I am currently writing a script to put in a single worksheet several ones,i.e. I want to put one column of 250 worksheets into a single column of a single worksheet, in order to perform several calculations on the whole data set (I don't want to make them 250 times !). I tried some script, like the one i found here : http://www.originlab.com/forum/topic.asp?TOPIC_ID=6860 but it doesn't work for me, I meet the error : Source(1) is not defined.
In an other attempt, I was thinking to use the colcopy command, but I'm meeting this error : "Error: value titre!Col(2) is missing a variable name"; Indeed, my worksheet are renamed "Sans titrex" where x is an integer between 0 and 250 when I import my data.
So because I'm a bit lost and kinda new in the scripting world, I am looking for some helps, or at least advices :)

VincentLiu

China
Posts

Posted - 03/10/2011 :  03:41:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
For your specific situtation, I suggest you to send your detailed question and OPJ through here. If the file is too large, please send it through here.

Vincent
OriginLab Technical Services
Go to Top of Page

Nirruob

France
4 Posts

Posted - 03/10/2011 :  11:03:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi.
I have uploaded the project "mesure 08" to your FTP, hoping it will give you a better idea of what i want to do :)
Go to Top of Page

VincentLiu

China
Posts

Posted - 03/14/2011 :  06:17:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Please first create a new workbook and make sure its name as Book2. Then try the following scripts to move all the rows of 250 worksheets in Book1 to Sheet1 of Book2. Please note that I just directly move the data into Book2, which means you need to perform some subsequent operations to get what you want, such as set the sampling interval etc (also could be done with scripts).

int maxrow  =1;
range aa = [book2]1!;
for(ii=1; ii<=250; ii++)
{
wrcopy iw:=[book1]$(ii)! dr1:=$(maxrow) ow:=[Book2]1; 
maxrow = aa.maxrows+1;
}

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