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
 Add worksheet to workpage
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

a.abc.b35

175 Posts

Posted - 05/04/2011 :  01:49: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): Origin 8 SR0
Operating System: WIn XP
...........
I think this is elementary but am not able to get the correct functions to get this task done. Can anyone help me in creating, say 10 worksheets, inside a particular workbook ? Say, I call the workbook (or worksheetpage) as wp. Can anyone tell me how to create 10 worksheets inside wp, with name as wks_1,wks_2,....,wks_10.

AB

greg

USA
1379 Posts

Posted - 05/04/2011 :  3:41:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
void add_10(string strWkBk)
{
WorksheetPage wp(strWkBk);
if( wp )
{
for(int idx = 1 ; idx <= 10 ; idx++)
{
string str;
str.Format("wks_%u", idx);
wp.AddLayer(str);
}
}
}

Call with
add_10(Book1)
for example.

I guess the key is understanding that a Worksheet is just a Layer within a Workbook.

Edited by - greg on 05/04/2011 3:42:44 PM
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