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
 creating/renaming a workbook using string/integer

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
JulesOZ Posted - 11/11/2013 : 11:50:54 PM
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
2   L A T E S T    R E P L I E S    (Newest First)
JulesOZ Posted - 11/12/2013 : 7:40:57 PM
Thanks a lot! Seems I mostly just got the order of the $ wrong.
Now it is working very nice!
Castiel Posted - 11/12/2013 : 07:59:07 AM
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;


©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦

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