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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Duplicate Columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cheynitz

Germany
31 Posts

Posted - 01/29/2023 :  07:40:20 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Pro 2021b
Operating System: Win10

Hi everyone,
this might be a pretty basic question and maybe its rise is based on a wrong / inconvient approach anyway. So please feel free to suggest more elegant methods.

1.) I type my XY data directly in an Origin worksheet. It should have the structure XYXYXY.

2.) I have constructed the first XY pair in their corresponding two columns with merged cells in the header to make it more cleary

--> How can i duplicate this pair while keeping the merged structure?

Greetings and thank you


Edited by - cheynitz on 01/29/2023 07:41:58 AM

yuki_wu

896 Posts

Posted - 01/29/2023 :  10:33:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can add your own routine to do this.
1. Click Code Builder button to open code builder
2. Open LabTalk ogs file: <User File Folder>/Custom.ogs
3. Copy the script below and paste it to [Main] section
4. Click Custom Routine to add columns
	//type -b $General.Userbutton;
	//add two new columns
	wks.nCols = wks.nCols + 2;
	//set the first new column as X 
	wks.col = wks.nCols - 1;
	wks.col.type = 4;
	//set the second new column as Y 
	wks.col = wks.nCols;
	wks.col.type = 1;
	//select cells
	worksheet -sl $(wks.nCols - 1) 1 $(wks.nCols) 1;
	//merge long name
	menu -e 35045;






Hope it helps.

Regards, Yuki
Go to Top of Page

cheynitz

Germany
31 Posts

Posted - 01/30/2023 :  03:38:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Yuki,

thank you very much. Works fine :)

Kind regards
Christian
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000