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

oconnor

UK
Posts

Posted - 12/02/2004 :  09:26:09 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Origin 7.5
Operating System: Windows XP

Hi,

If I create a worksheet with:

Worksheet wks;
wks.Create( "Origin.otp");

How do I assign that worksheet a name? I have tried wks.SetName("Results"); and Worksheet wks("Results"); followed by wks.Create("Origin.otp"); and neither works.

Thanks,

Rod.

rlewis

Canada
253 Posts

Posted - 12/02/2004 :  09:50:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try ... Wks.GetPage().Rename("Results");
Go to Top of Page

easwar

USA
1965 Posts

Posted - 12/02/2004 :  11:20:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Rod,

Just wanted to add the following comment:

The name you see on the title bar of the worksheet window (such as Data1) is actually the name of the Window/Page. The Page then contains the worksheet as a layer. There is only one Worksheet Layer per Page, and internally the worksheet layer has the name "Layer1", which is what you will get if you do a wks.GetName().

This is why you need to first get the page and rename the page instead, as Ruthven shows in his post.

Easwar
OriginLab

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