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
 working with multiple 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

Weldon

USA
Posts

Posted - 02/21/2005 :  6:47:06 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System: w2k

I wrote a script to loop through the columns of one worksheet, integrating each one. This works fine, but I run into trouble when I try to write them to a second worksheet.
I call the integrating script form a for loop, but how can I put them into rows in the other worksheet?

This doesn't work, of course, but it's what I'm trying to do.
data1_b[%(i)] = integ data2_col(%(i))
How do I specify a worksheet and loop through columns in numerical sequence?

Mike Buess

USA
3037 Posts

Posted - 02/21/2005 :  9:43:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This will integrate each column in data2 and place the areas in data1...

for(i=1; i<=wks.ncols; i++) {
integ %(data2,i); // integrate col i
data1_b[i]=integ.area; // put area in row i
};

Mike Buess
Origin WebRing Member
Go to Top of Page

Weldon

USA
Posts

Posted - 02/23/2005 :  8:41:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes it does work, thanks.
This substitution notation is funky stuff. Is there any where I can get a simple explanation of the syntax?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 02/23/2005 :  10:21:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Probably the most concise explanation is in the programming guide...

LabTalk Language Reference-> Overview of the LabTalk Language-> Substitution Notation


See also...

LabTalk Language Reference-> Overview of the LabTalk Language-> Data Types-> Datasets-> Accessing Dataset Elements

Mike Buess
Origin WebRing Member
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