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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 renaming a worksheet

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jgeskey Posted - 05/30/2006 : 3:17:32 PM
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





2   L A T E S T    R E P L I E S    (Newest First)
jgeskey Posted - 05/31/2006 : 10:03:54 AM
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

easwar Posted - 05/30/2006 : 4:11:04 PM
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


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000