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

jgeskey

USA
Posts

Posted - 05/30/2006 :  3:17:32 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR4
Operating System:Win XP prof

I can rename a workpage with:

string name = "myName";
workpage wp;
wp.rename(name);

why can't I do that with a worksheet like:

string name = "myName";
worksheet wks;
wks.rename(name);

Does anyone know a way to do this? I've tried many different ways.

john





easwar

USA
1965 Posts

Posted - 05/30/2006 :  4:11:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi John,

Currently the worksheetpage contains only one worksheet and so there is not much use for worksheet name property.

You could get to the page from the sheet and rename, with code such as:


Worksheet wks = Project.ActiveLayer();
string name = "myName";
wks.GetPage().Rename(name);


Easwar
OriginLab

Go to Top of Page

jgeskey

USA
Posts

Posted - 05/31/2006 :  10:03:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Easwar,

thanks for the tip, your solution worked like a charm. I'm fairly new to Origin C programming and twice I have posted questions that were both quickly answered and gave me exactly what I needed. I see good things in the future with Origin.

john

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