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
 creating/renaming a workbook using string/integer
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

JulesOZ

18 Posts

Posted - 11/11/2013 :  11:50:54 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0
Operating System: Win7

Hi all,
very basic question: I'd like to create workbooks and name them using an integer given in the program, so I get workbooks named workbook1check, workbook2check, workbook3check,...
I tried using the newbook name:= function in this way:
int jj=1;
string $stringj=($jj);
newbook name:= "workbook"+$stringj+"check";

but that is not working (=
Can anybody suggest a solution?

Thanks,
Jules

Edited by - JulesOZ on 11/11/2013 11:51:55 PM

Castiel

343 Posts

Posted - 11/12/2013 :  07:59:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You were talking about LabTalk, right? Then you may try this:

    loop(jj,1,3)
    {
        string str$=$(jj);
        newbook name:="workbook"+str$+"check" option:=lsname;
    }

I'm afraid even "workbook1check" would be too long for a short name....for more information:

    help newbook;


妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
Go to Top of Page

JulesOZ

18 Posts

Posted - 11/12/2013 :  7:40:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks a lot! Seems I mostly just got the order of the $ wrong.
Now it is working very nice!
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