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
 Forum for Origin C
 Adding multiple columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jens-peter

Germany
3 Posts

Posted - 07/15/2003 :  09:46:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Is there a way to creata, let's say, 500 columns at once and NOT looping worksheet.AddCol 500 times?
TIA
Jens

Septor

Austria
12 Posts

Posted - 07/15/2003 :  10:00:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
try it with

Worksheet wks;

wks = (Worksheet)proj.ActiveLayer();
ActWksName = wks.GetPage().GetName();

LT_set_str("%Z", ActWksName);
LT_execute("%Z!wks.insert(name list)");

the list can consist of one or more desired column names separated by spaces.
Go to Top of Page

jens-peter

Germany
3 Posts

Posted - 07/15/2003 :  10:54:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the hint!
But it seems to me that no more than 11 columns can be created at once. I tried the Strimng "0 1 2 3 4 5 6 7 8 9 10 ...", and only the first 11 columns were added to the worksheet.
Jens
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 07/15/2003 :  6:26:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Jens,

This should do it (although I've never actually tried with N as large as 500)...

worksheet -a N; // Add N columns to the active worksheet

Oops, this is the Origin C forum. Make that

LT_execute("wo -a 500");

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 07/15/2003 6:34:57 PM

Edited by - Mike Buess on 07/15/2003 6:35:38 PM
Go to Top of Page

jens-peter

Germany
3 Posts

Posted - 07/16/2003 :  03:28:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike!
This does the trick :)
Jens
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