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
 Forum for Origin C
 How to add column to the front of worksheet?

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
ashvilki Posted - 08/24/2003 : 7:50:46 PM
Hi, guys!
Does anybody know how to insert a column in front of the worksheet (and make it X) rather than add to the end?
Thanks a lot,

Alexei
2   L A T E S T    R E P L I E S    (Newest First)
ashvilki Posted - 08/25/2003 : 9:32:20 PM
Thanks, Mike!
Both methods worked.
Alexei
Mike Buess Posted - 08/24/2003 : 8:54:47 PM
Hi Alexei,

worksheet -i 0; // insert col at beginning of wks
worksheet -t 1 4; // set the type of the first column (4=X col, look at LabTalk help for others)

...Since this is the Origin C forum you might prefer the following.

void test()
{
string colNameCreated;
Worksheet wks = Project.ActiveLayer();
if( wks.InsertCol(0,"",colNameCreated) )
{
wks.Columns(0).SetType(OKDATAOBJ_DESIGNATION_X);
printf("New column is %s\n",colNameCreated);
}
else
printf("Could not create new column.\n");
}

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 08/25/2003 2:07:49 PM

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