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
 convert or transpose a single column to a row...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kencedric

Germany
13 Posts

Posted - 10/27/2011 :  12:01:36 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hey
i am using Labtalk script for the first time and i want to convert(transpose) a column to a row.
May be someone can help me.
exemple
Mo 1 8 8 9 9
Di 2 1 1 2 5
Mi 3 2 5 6 8
Do 4 2 0 6 0
Fr 5 3 2 4 8


to

Mo Di Mi Do Fr
1 8 8 9 9
2 1 1 2 5
3 2 5 6 8
4 2 0 6 0
5 3 2 4 8


As u can see, only Mo,Di, Mi, Do and Fr have to move, to be placed in a row...
Thanks for the Help
Cedric

Hideo Fujii

USA
1582 Posts

Posted - 10/27/2011 :  1:42:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Cedric,


If you want to transpose a worksheet by a script. you can use a single command (actually an x-function):

    wtranspose

--Hideo
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 10/27/2011 :  3:26:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Is it your intent to only transpose Col 1? If so, you can still use wtranspose, but it is not as simple. Try this:

wtranspose exchange:=1 type:=long col:=1; // Transpose labels and data
del col(A); // Delete column A because it is empty.
wtranspose; // Transpose numeric data back to original order.

This has the added effect of separating your text from your numeric data, which may be useful if you want to refer to your datasets by your text labels.
Go to Top of Page

kencedric

Germany
13 Posts

Posted - 10/31/2011 :  09:19:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thx Guys
@Drbobshepherd: thanks for ur Help,it works perfectly.
Go to Top of Page

fatihk29

Germany
3 Posts

Posted - 10/04/2012 :  06:30:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey guys, also i want to transpose a column to a row, but which is the column taken from another sheet. So, i ll take a column from another sheet and paste it to the active sheet as transposed. for example;

t c (p) p*
7 14 12 12 23 14
8 16 23
6 12 14

*(p) is taken from another sheet, p* transposed of (p)
is there a script for this process. I would appreciate if someone can help me ?

Edited by - fatihk29 on 10/04/2012 06:39:43 AM
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