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
 Copy comment cell of several sheets from one book

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
w.eisen Posted - 01/27/2009 : 08:42:04 AM
Origin Ver. 8G SR2 v8.0891
Operating System: WinXP

Hi,
I imported 31 data sheets into one Book (one sheet for each day of a month).
The comment line contains the file name aka. the date.

range a = [Book2]Sheet18!Col(B);
range b = [Book1]A18!Col(B);
b = a * (some function);


Now I want to copy these comment lines into another book with 31 sheets, to assign the right date to the data columns in the comment lines in Book2:

I tried this

range c = [Book2]sheet1!col(B)[Co]
range d = [Book1]A31!col(B)[Co]
c=d;

[Co] = Comment

It didnt work...

Can someone help?
2   L A T E S T    R E P L I E S    (Newest First)
w.eisen Posted - 01/27/2009 : 11:02:50 AM
Very nice hint! The 'colcopy' Function was what i was actually looking for.

Thx al lot!
greg Posted - 01/27/2009 : 10:32:47 AM
While defining a range to include just a particular header row appears to work (that is Origin does not complain), you cannot work with that range. To get this working, you only need to leave out the header row notation in the range definition and only use it when you reference the header for that range. So this should work:

range c = [Book2]sheet1!col(B);
range d = [Book1]A31!col(B);
c[C]$ =d[C]$;

It isn't clear from the above whether data and header are supposed to stay together, but you might look at the 'colcopy' X-Function which can copy both.

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