T O P I C R E V I E W |
martinoli |
Posted - 06/26/2002 : 09:08:44 AM I'm trying to use the command
work -n colRef newName
to change the column's name, but using the original column name instead of the numeric reference. I've tried
work -n data1_A AA;
and it doesn't work (A is one column of the data1 worksheet, AA the newname). I'm using the command as indicated in the labtalk manual. I've tried also making the window active and then just
work -n A AA;
The response is always the awful #command error ! I'll appreciate very much if you can help me with this. Cheers! |
6 L A T E S T R E P L I E S (Newest First) |
martinoli |
Posted - 06/27/2002 : 04:22:28 AM -
Edited by - MARTINOLI on 06/27/2002 04:26:35 |
martinoli |
Posted - 06/27/2002 : 04:21:19 AM (To Yuri 2)
THANK YOU!!!
 |
martinoli |
Posted - 06/27/2002 : 04:20:30 AM ..
Edited by - MARTINOLI on 06/27/2002 04:25:56 |
Mike Buess |
Posted - 06/26/2002 : 1:03:35 PM You must be using an older version of Origin. The Origin 5.0 manual says something about using a name instead of number for colRef, but the 7.0 manual states specifically that colRef must be a number (as quoted by Yuri). The manual was undoubtedly revised because of experiences like yours.
If you need to change the name of a column but don't know the column number you can use something like this (the worksheet in question must be active)...
%A=current_name; loop (ii,1,wks.ncols) { %B=wks.col$(ii).name$; if("%B"=="%A") break; }; wo -n ii new_name;
That script works in Origin 5 and up. (Notice that %A and %B are both in quotes in the if statement. That's necessary when comparing string variables.)
Mike Buess Origin WebRing Member |
martinoli |
Posted - 06/26/2002 : 12:15:33 PM I know that it works with the column number, my problem is that I want to use the column name. In the manual it says that if you don't type the number, it assumes you are typing the column name, but it doesn't work...Thanks anyway.
|
yuivanov |
Posted - 06/26/2002 : 10:15:55 AM Hi Piero Here is the text from the help article: -n colRef newName Change the name of the colRef column to newName. ColRef must be the column number.
So I assume that if you type:
work -n 1 AA;
it should work. Thanks Yuri
Edited by - yuivanov on 06/26/2002 10:25:36 |