Author |
Topic  |
|
AKazak
Russia
1205 Posts |
Posted - 03/03/2022 : 02:18:57 AM
|
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
|
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 |
 |
|
ChaoC
USA
185 Posts |
Posted - 03/03/2022 : 11:59:46 AM
|
Hi Andrey,
You can use the X-function wjoinbycol to join >2 sheets. Entering wjoinbycol -d; will open the dialog for that function.
Chao |
 |
|
AKazak
Russia
1205 Posts |
Posted - 03/03/2022 : 2:01:34 PM
|
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 |
 |
|
AKazak
Russia
1205 Posts |
Posted - 03/18/2022 : 3:22:00 PM
|
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 |
 |
|
snowli
USA
1417 Posts |
Posted - 03/31/2023 : 09:09:14 AM
|
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
|
 |
|
AKazak
Russia
1205 Posts |
Posted - 03/31/2023 : 10:14:09 AM
|
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 |
 |
|
snowli
USA
1417 Posts |
Posted - 03/31/2023 : 11:20:27 AM
|
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 |
 |
|
AKazak
Russia
1205 Posts |
Posted - 03/31/2023 : 12:18:11 PM
|
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 |
 |
|
snowli
USA
1417 Posts |
Posted - 03/31/2023 : 12:35:18 PM
|
It's sheet names. U can also try 1:4, which are indices.
Thanks, Snow |
 |
|
AKazak
Russia
1205 Posts |
Posted - 04/07/2023 : 1:44:24 PM
|
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 |
 |
|
snowli
USA
1417 Posts |
Posted - 04/07/2023 : 1:59:43 PM
|
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 |
 |
|
|
Topic  |
|