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

olsy

29 Posts

Posted - 09/22/2011 :  10:23:51 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.5Pro
Operating System:Win7

Hi!

i am trying to use foreach statement to loop over my worksheets but i need to start looping from specified worksheet with name "Statistics".
The position of this worksheet can be different so i cant use it number. Is it possible somehow to access it and set at a beginning of my if circle?

Penn

China
644 Posts

Posted - 09/22/2011 :  10:12:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can first get the worksheet name by OriginObject::GetName() method, and then compare with your specified name to see whether that is the worksheet you are looking for. If yes, use the Layer::GetIndex() method to get the worksheet index, then you can finish the rest loop by starting from this index.

Penn

Edited by - Penn on 09/22/2011 10:13:09 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