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
 Transpose worksheet and copy Data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

nastrovja

Germany
2 Posts

Posted - 06/22/2015 :  08:55:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 9.0G
Operating System:Win7
Hi everyone this is my first post i couldn't find any exakt answer to my question hope it is the right place for my request:

I have a workbook with several sheets it i already sortet an i did the statistics.
now i want to copy the col with (sum, min, max, nuber of points, mean) transposed to a result book.
i've tried a loop an also a for-loop but neither works. But if i do do it step by step it works.:

the for-loop:
win -a book1;//activate data book
nsheet = page.nlayers;//get number of sheets
for (ii=1;ii <= nsheet;ii++){;
copydata irng:=[book1]$(ii)!2 orng:= [output];//copy second Col of sheet ii to book output
wtranspose;//transpose ouput book
copydata irng:=[output]1!(1:6) orng:= [results]1!(1[$(ii)]:6[$(ii)]);//cpoy transposed data to result book
win -c output; //delete output for next loop
}


i don't where i make my mistake because if i do it step by step ist works just fine

lkb0221

China
497 Posts

Posted - 06/22/2015 :  11:14:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
1). In the first CopyData XF, you need to specify the target column for pasting.
2). You can also try wrcopy XF.
Go to Top of Page

nastrovja

Germany
2 Posts

Posted - 06/23/2015 :  05:21:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your answer. But this didn't solve my problem. Now i get following error message:

[23.06.2015 11:18:32 copydata]
Failed to resolve range string, VarName = irng, VarValue = [book1]3!2

Go to Top of Page

lkb0221

China
497 Posts

Posted - 06/23/2015 :  09:57:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There is a redundant semicolon at the end of the line where your for loop is. Please delete it.
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