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 for Programming
 LabTalk Forum
 Column Formula: get Long Name values to 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
1228 Posts

Posted - 07/19/2022 :  05:28:21 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2022b (64-bit) SR1 9.9.5.167
Windows 7 Pro SP1 x64

Greetings!

What syntax will return all the Long Names starting from column 2 till the end column in Sheet 1 to the target column in Sheet 2.

Thank you.

---
Andrey

YimingChen

1684 Posts

Posted - 07/19/2022 :  10:54:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You will need to loop all columns and save the column longnames to a StringArray and copy to the target column:

StringArray sa;
for (int i = 2; i <= wks.ncols; i++) {
	sa.add(wcol(i)[L]$);
}
range rr = 2!col(A);
sa.CopyTo(rr); 


Python code maybe simpler:

import originpro as op
wb = op.find_book()
wks = wb[0]
names = wks.get_labels()[1:-1]
wks = wb[1]
wks.from_list(0, names)


James

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