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 Cols from all the workbooks

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
Salmabejaoui Posted - 11/22/2019 : 2:49:45 PM
Hi Labtalk user
Is it possible to copy 2 columns from all the workbooks in an origin project and paste them successively in a new workbook.
I want to do that without specifying the name of each workbook.
Thanks in advance for your help



Salma
1   L A T E S T    R E P L I E S    (Newest First)
Chris D Posted - 11/22/2019 : 3:35:55 PM
This code copies columns 1 & 2 from first sheet of every workbook into a single new workbook. I hope it helps.


newbook;
string sbook$ = %H;
wks.ncols = 0;
doc -e W {
	if (%H == sbook$) continue;
	dataset ds1 = col(1);
	dataset ds2 = col(2);
	win -a %(sbook$);
	wks.ncols += 2;
	copy ds1 wcol(wks.ncols-1);
	copy ds1 wcol(wks.ncols);
}



Thanks,
Chris Drozdowski
Originlab Technical Support

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