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

shawn_007

Hong Kong
Posts

Posted - 04/18/2005 :  02:10:19 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin):
Operating System:

There are several Worksheets in origin. How can I use the worksheet group(Worksheet wks[i]) to get the worksheets of origin?

Following is my code. I know it's wrong,but don't konw how to improve it.

void try()
{
Worksheet wks[5];
for ( int i=0; i<5;i++
wks[i]=Project.Layers(i);
}

rlewis

Canada
253 Posts

Posted - 04/18/2005 :  03:37:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try this ...

void GetWorksheetObjects()
{
foreach (PageBase pB in Project.Pages)
{
if(pB.GetType()==EXIST_WKS)
{
Worksheet Wks(pB.GetName());
if(Wks.IsValid()==true)
{
// Do something with Wks
}
}
}
}
Go to Top of Page

shawn_007

Hong Kong
Posts

Posted - 04/18/2005 :  5:18:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You really help me fix my headache problem.Thank you.

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