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
 Merge books depending on column header

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
Clairekun Posted - 07/16/2020 : 8:14:56 PM
Origin Ver. and Service Release (Select Help-->About Origin): 2018b
Operating System: Windows 10

Hello,

I have several workbooks where some of the columns share a header name, while others don't, and the shared headers aren't necessarily in the same column number:





In the example above, shared headers would be Al2O3, SiO2, SO3 and CaO, while columns Fe2O3 and K2O are new. However, shared columns aren't always in the same place; i.e. SO3 is in Column 4 in the first picture, and in Column 5 in the second one.

Would it be possible to merge both workbooks/worksheets so that the values from shared headers always get appended to the correct column, while new columns are created for new headers?

I don't need any particular column order, and I wouldn't mind having to specify header names manually, in case it was necessary.

Thank you.
2   L A T E S T    R E P L I E S    (Newest First)
Clairekun Posted - 07/22/2020 : 08:47:56 AM
Thanks, took me a while to fully understand the command, but finally managed to do it.

I used:

wjoinbylabel irng:=(1:end)! label:=L unmatch:=0 multiple:=0 ow:=[<new>]<new>; 
win -r %(page.name$) Merged;
layer.name$ = Results;


Regards,

Claire.
AmandaLu Posted - 07/16/2020 : 11:27:41 PM
Hi,

Please try Worksheet: Joint Worksheets by Label. Here is the detailed document:

https://www.originlab.com/doc/X-Function/ref/wjoinbylabel

Thanks,
Amanda
OriginLab Technical Service

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