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
 LabTalk Forum
 Set Comment of all workbooks in Folder X

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
Cromatej Posted - 12/18/2020 : 09:02:51 AM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Windows 10
OriginPro 2019b (32-bit)
9.6.5.169

Hello,

is there any possibility to set the comment in all workbooks and columns which are in Folder X. I just want to avoid looping over all workbooks and columns and set the comment for each column by itself.

Thank you

Best regards Matej
2   L A T E S T    R E P L I E S    (Newest First)
Cromatej Posted - 12/22/2020 : 5:23:23 PM
quote:
Originally posted by Chris D

Perhaps someone knows better but here is the LabTalk to do it though it does require loops.

doc -ef W {
    page.comments$ = "Book Comments";
    int nwks = page.nlayers;
    for (int ii = 1; ii <= nwks; ii++) {
        page.active = ii;
        int ncols = wks.ncols;
        for (int nn = 1; nn <= ncols; nn++) {
            wcol(nn)[C]$ = "Column Comments";
        }
    }
}


Thanks,
Chris Drozdowski
Originlab Technical Support




Thank you for your answer. The code does exactly what I want. Just another question...is there any possibility to navigate into a folder named X?

I want that the code is applied in all folders which are listed f.e. in a workbook. (Folder 1, Folder 3, Folder 4,....)

Any ideas for this? Couldn't find a command which navigates into a desired folder.

Thank you Matej
Chris D Posted - 12/18/2020 : 11:45:18 AM
Perhaps someone knows better but here is the LabTalk to do it though it does require loops.

doc -ef W {
    page.comments$ = "Book Comments";
    int nwks = page.nlayers;
    for (int ii = 1; ii <= nwks; ii++) {
        page.active = ii;
        int ncols = wks.ncols;
        for (int nn = 1; nn <= ncols; nn++) {
            wcol(nn)[C]$ = "Column Comments";
        }
    }
}


Thanks,
Chris Drozdowski
Originlab Technical Support

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