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
 How to set column as x or y
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

country_road

USA
7 Posts

Posted - 08/16/2010 :  2:27:42 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver8.1. and SP3 (Select Help-->About Origin):
Hi,

How to set any(one) column as X (or Y)? Let's say I try to set Book1, sheet1, column D as x and column E ax Y. How can I do it by script?

Thanks,

Steve

larry_lan

China
Posts

Posted - 08/16/2010 :  4:11:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Use the Wks.col object.

wks.coln.type = 4; // Set as X
wks.coln.type = 1; // Set as Y

where n is the index of column.

Thanks
Larry
OriginLab Technical Services
Go to Top of Page

country_road

USA
7 Posts

Posted - 08/16/2010 :  4:40:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much Larry. It works.

Is there any way that I can use column name (like column D) rather than the column index? There are too many columns (hundreds of), and some times I have difficulty to figure out the column index.

Thanks again,

Steve
Go to Top of Page

larry_lan

China
Posts

Posted - 08/16/2010 :  5:35:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
How about using range variable:

range rr = !col(b);
rr.type = 4;

Larry
Go to Top of Page

country_road

USA
7 Posts

Posted - 08/16/2010 :  5:46:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It works again.

Thanks.
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