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
 Copy selected columns to other worksheet(s)

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
AKazak Posted - 03/21/2026 : 08:52:33 AM
OriginPro 2026b (64-bit) Beta2 10.3.5.62
Windows 10 Pro

Greetings!

I have a number of worksheets sharing the same structure.
In a single worksheet I add few additional columns with formulas and LT scripts before formula.

What is the best way to copy these extra columns to all the other similar worksheets by insert new columns to the same locations as those of the original columns?

Please see a sample project below:
https://my.originlab.com/ftp/forum_and_kbase/Images/2026-03-21.opju

How do I duplicate column B along with its headers formulas from Sheet1 to all the other sheets?

Thank you.

---
Andrey
4   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 03/24/2026 : 10:03:43 AM
quote:
Originally posted by cpyang

We are adding this ability in 2026b to add column to other sheets.
We can work on also Insert support.
Or adding is good enough?




CP




Dear CP,

Add and Insert would be great!
Besides, please implement selection 1+ source columns to paste to the similar worksheets.

---
Andrey
cpyang Posted - 03/24/2026 : 09:02:47 AM
We are adding this ability in 2026b to add column to other sheets.
We can work on also Insert support.
Or adding is good enough?




CP
AKazak Posted - 03/23/2026 : 2:58:22 PM
quote:
Originally posted by YimingChen

You may try the script below:


for (int i = 2; i <= page.nlayers;i++) {
	page.active = i;
	wks.col = 2;
	wks.insert();
	range rs = 1!;
	wks.col.formula$ = %(rs.col2.formula$);
	wks.col.lname$ = %(rs.col2.lname$);
}


Yiming



Got it.
Is there a way to do the same via GUI?

---
Andrey
YimingChen Posted - 03/23/2026 : 2:55:45 PM
You may try the script below:


for (int i = 2; i <= page.nlayers;i++) {
	page.active = i;
	wks.col = 2;
	wks.insert();
	range rs = 1!;
	wks.col.formula$ = %(rs.col2.formula$);
	wks.col.lname$ = %(rs.col2.lname$);
}


Yiming

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