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 naming (wks.addcol)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

schneide

Germany
45 Posts

Posted - 01/25/2017 :  10:44:33 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin 2017 (64 bit) b9.4.0.220
WIN7

I have worksheet with columns "A" and "B"

wks.addcol(ww) adds a column "C"

in earlier versions Origin used to add a column named "ww"

How do I create a user-defined column name now?

Giselher

Hideo Fujii

USA
1582 Posts

Posted - 01/25/2017 :  1:02:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Giselher,

From the latest Origin 2017, Origin adopts the spreadsheet notation (like Excel) for the column name in default.
It makes the column reference easier, but the column short names follow the restriction accordingly. See:
http://www.originlab.com/doc/Origin-Help/Column-Short-Names-Restrict

So, to set the column short name arbitrarily, you need to turn off page.xlcolname property; That is:
page.xlcolname=0;
wks.addcol(ww);
Does this solve the problem?

--Hideo Fujii
OriginLab
Go to Top of Page

schneide

Germany
45 Posts

Posted - 01/30/2017 :  09:36:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, this is exactly what I needed.

To get rid of the error message when using the labtalk script for Origin < Origin2017 I use the line

if %(@V$) > 9.4 page.xlcolname=0;

Giselher
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 01/30/2017 :  1:57:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Should be


if(@V >= 9.4) page.xlcolname=0; 



CP
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