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
 Origin Forum
 Addition of column from multiple workbook

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
yashsoni06@gmail.com Posted - 09/23/2020 : 05:54:58 AM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: WINDOW 10

Dear Colleague
I have 10 workbooks in a project in which i want to perform the addition of B column of each sheet in the workbook. How can i do this in origin.
pls help me!


Vhttps://my.originlab.com/ftp/forum_and_kbase/Images/Addition%2005.opj
3   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 09/24/2020 : 09:54:48 AM
If that's the case, you can write script to loop over all workbooks in the project, add two columns of the sheet and save to a new sheet. Try script below that adds col(2) and col(3) and save to result sheet.


doc -e W  // Execute for all workbooks in the project
{
	range r1 = 2;
	range r2 = 3;
	newsheet name:=result cols:=1;
	col(A) = r1 + r2;
}


James
yashsoni06@gmail.com Posted - 09/24/2020 : 12:51:45 AM
Dear James
Thanks for reply.
I have tried to run the LT Script.But, i am unble to get the out in the worksheet.
I have 10 different worksheet named as (1.dat, 2.dat,...10.dat) located in the project window. i would like to have the 2 column of each sheet to be added and out to apperas in seprate new worksheet worksheet [book1]. I have been trying this since 4-5 days. Where is the mistake i am doing?
Origin 8.5 version


quote:
Originally posted by YimingChen

Create a new worksheet, then run the LT script below in Window:Script Window:

range r1 = col(B);
r1 = 0;
for (int i = 1; i<=10; i++)
{
	range rr = [A$(i)]1!2;
	r1 = r1 + rr;
}


James



V
YimingChen Posted - 09/23/2020 : 10:55:08 AM
Create a new worksheet, then run the LT script below in Window:Script Window:

range r1 = col(B);
r1 = 0;
for (int i = 1; i<=10; i++)
{
	range rr = [A$(i)]1!2;
	r1 = r1 + rr;
}


James

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