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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Inserting columns

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
LucSerre Posted - 02/01/2005 : 12:47:04 PM
Origin Version (Select Help-->About Origin): 6.1
Operating System:win2k

I have wks with about 60 Y cols. (ex: X y1 y2 y3 y4...y60)
I'm trying (unsuccesfully) to add a blank column between all the y's.
Ex: X y1 y1b y2 y2b y3 y3b...y60 y60b

Is there a command don't know about that I can use?
Is there a simple way of doing this?

Thanks,
Luc S
7   L A T E S T    R E P L I E S    (Newest First)
LucSerre Posted - 02/01/2005 : 3:12:54 PM
Ok then, Thanks very much for the help.
Mike Buess Posted - 02/01/2005 : 2:55:17 PM
Sounds like a bug and I would certainly avoid doing that. It will likely bite you when you need to use the column name in a LabTalk command.

Mike Buess
Origin WebRing Member
LucSerre Posted - 02/01/2005 : 2:49:24 PM
WHen I use this code, right after the code that I just pasted my last message, it works.

for(ii=wks.ncols;ii>1;ii--)
{
wo -i $(ii) mes$(cell(1,ii));
};

This actualy puts the - in the col name.
I don't know how that happened.
Mike Buess Posted - 02/01/2005 : 2:46:19 PM
The minus sign (along with most other special characters) is not allowed in a column name. Double-click on a column and try to name it P-9.2 yourself. Won't work.

Mike Buess
Origin WebRing Member
LucSerre Posted - 02/01/2005 : 2:03:47 PM
Ok, now I'm trying to do it a little diffrently and i'm getting confuzed.

Instead of renaming them to Yb1 format, I'm trying to rename the col to the string of the value of the cell right below the col title
For example, I'm trying to rename col 4 to cell(1,4).

for(ii=wks.ncols;ii>1;ii--)
{
work -n $(ii) P$(cell(1,ii));
};

This works, except that it doesn't keep the sign of the cell.
Ex, if cell(1,4)= -9.2, then it only make the title P9.2 and not P-9.2
LucSerre Posted - 02/01/2005 : 1:35:14 PM
Thanks Mike!
Great help!

That is the boost I needed to keep going with this project!
Thanks again!

-Luc S
Mike Buess Posted - 02/01/2005 : 1:16:15 PM
Hi Luc,

Starting with columns X Y1 Y2 the command "wo -i 2 Y1b" will create X Y1 Y1b Y2. If you're doing this in a loop keep in mind that inserting a column changes the numbering of all columns to the right. That will affect how you should structure the loop.

...In your case the following script should work.

for(ii=wks.ncols;ii>1;ii--) {
wo -i ii Y$(ii-1)b;
};

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 02/01/2005 1:24:59 PM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000