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.
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.