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
 Join > 2 Worksheets by Column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 03/03/2022 :  02:18:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2022 (64-bit) SR1 9.9.0.225
Windows 7 Pro SP1 x64

Greetings!

I have few (>2) worksheets sharing the same reference column.
What is the proper way to join the by the column?

Thank you.

---
Andrey

AKazak

Russia
1205 Posts

Posted - 03/03/2022 :  05:05:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AKazak

OriginPro 2022 (64-bit) SR1 9.9.0.225
Windows 7 Pro SP1 x64

Greetings!

I have few (>2) worksheets sharing the same reference column.
What is the proper way to join the by the column?

Thank you.

---
Andrey



Currently the only way I see it looping https://www.originlab.com/doc/en/Origin-Help/join-worksheets-bycol via LT.

---
Andrey
Go to Top of Page

ChaoC

USA
185 Posts

Posted - 03/03/2022 :  11:59:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

You can use the X-function wjoinbycol to join >2 sheets.
Entering wjoinbycol -d; will open the dialog for that function.

Chao
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 03/03/2022 :  2:01:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by ChaoC

Hi Andrey,

You can use the X-function wjoinbycol to join >2 sheets.
Entering wjoinbycol -d; will open the dialog for that function.

Chao



Dear Chao,

Got it!
Thank you.

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 03/18/2022 :  3:22:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you comment on a way how Origin does understand the following syntax for multiple sheet range?
([BookName1]SheetName1!, [BookName2]SheetName2!)

Thank you.

---
Andrey

Edited by - AKazak on 03/18/2022 3:22:30 PM
Go to Top of Page

snowli

USA
1417 Posts

Posted - 03/31/2023 :  09:09:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Andrey,

Could you clarify the question and see if variables table on the following page answers your question.
https://www.originlab.com/doc/X-Function/ref/wjoinbycol?f=dl#Variables

Thanks, Snow


quote:
Originally posted by AKazak

Can you comment on a way how Origin does understand the following syntax for multiple sheet range?
([BookName1]SheetName1!, [BookName2]SheetName2!)

Thank you.

---
Andrey

Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 03/31/2023 :  10:14:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

Hi Andrey,

Could you clarify the question and see if variables table on the following page answers your question.
https://www.originlab.com/doc/X-Function/ref/wjoinbycol?f=dl#Variables

Thanks, Snow



How does The syntax ([BookName1]SheetName1!, [BookName2]SheetName2!) actually work?

Does it take all the sheets with indices in the middle between [BookName1]SheetName1! and [BookName2]SheetName2! ?

---
Andrey
Go to Top of Page

snowli

USA
1417 Posts

Posted - 03/31/2023 :  11:20:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It seems you will have to list all in the irng:=.

The following works for multiple sheet1 to sheet4 in one book
wjoinbycol -r 2 irng:=[Book1](1:4)! condition:=A;
wjoinbycol -r 2 irng:=[Book1](Sheet1:Sheet4)! condition:=A;

But i can't use : to set a range of books.

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 03/31/2023 :  12:18:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

It seems you will have to list all in the irng:=.

The following works for multiple sheet1 to sheet4 in one book
wjoinbycol -r 2 irng:=[Book1](1:4)! condition:=A;
wjoinbycol -r 2 irng:=[Book1](Sheet1:Sheet4)! condition:=A;

But i can't use : to set a range of books.

Thanks, Snow



Dear Snow,

wjoinbycol -r 2 irng:=[Book1](Sheet1:Sheet4)! condition:=A;


Are Sheet1 and Sheet4 the existing sheet names or sheet indices?

---
Andrey
Go to Top of Page

snowli

USA
1417 Posts

Posted - 03/31/2023 :  12:35:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It's sheet names.
U can also try 1:4, which are indices.

Thanks, Snow
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 04/07/2023 :  1:44:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by snowli

It's sheet names.
U can also try 1:4, which are indices.

Thanks, Snow



Dear Snow,

When one specifies to sheet names like (Sheet1:Sheet4)!, then does Origin take all the sheets with indices between the index of Sheet1 and the index of Sheet4?

How do I use the long sheet names with this command?

Thank you.

---
Andrey
Go to Top of Page

snowli

USA
1417 Posts

Posted - 04/07/2023 :  1:59:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, that will take all sheets from Sheet1 to Sheet4.

Use " " around long name, which is called Label in recent versions
E.g. suppose sheet 1's long name is my 4. sheet 4's long name is my 7.
run this:
wjoinbycol -r 2 irng:=[Book1]("my 4":"my 7")! condition:=A;



Thanks, Snow
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