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
 LabTalk Forum
 Use book name in sheet name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

JonasKlim

Lithuania
36 Posts

Posted - 10/21/2017 :  05:42:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,
What operators to use to get book name and include book name in worksheet name?

Jonas

yuki_wu

896 Posts

Posted - 10/23/2017 :  02:25:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Jonas,

I am not sure if I understand your question fully. I suppose you want to get the workbook name and then rename the worksheet name with a string that includes workbook name.

You can refer to this simple example:

//Create a new workbook
newbook;
//Get the workbook name
string wn$  =  page.name$;
//Active worksheet by index
page.active  = 1;
//Rename the active worksheet
wks.name$ = wn$ + “Sheet1”;


More information about Workbook and Worksheet, please go through these pages:
http://www.originlab.com/doc/LabTalk/guide/Basic-Workbook-Operation
http://www.originlab.com/doc/LabTalk/guide/Worksheet-Basic-Operation

Hope it helps.

Regards,
Yuki
OriginLab

Edited by - yuki_wu on 10/23/2017 02:25:42 AM
Go to Top of Page

JonasKlim

Lithuania
36 Posts

Posted - 10/26/2017 :  05:04:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Yuki,
Thank you - this is exactly what I needed.
Regards,
Jonas

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