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
 No wks.col.name$ and ..label$
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

gaubitzer

Austria
1 Posts

Posted - 09/10/2002 :  12:24:18 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi

I'm having a problem with the properties of my worksheet.
I used a script for setting the type of a column.
It worked 2 or 3 times and afterwards the mentioned
properties were missing

Output
wks.col2.name$=;
WKS.COL2.NAME$=--

I'm using Origin 6.1. and the worksheet is rather large
(about 11MB).
The script was using this loop to find the wanted column
(script from another topic in this forum)

%A=Zeit;
loop (ii,1,wks.ncols)
{
%B=wks.col$(ii).name$;
if("%B"=="%A") break;
};
worksheet -t ii 4;

Can anyone tell me what has happened?

Thank you

cpyang

USA
1406 Posts

Posted - 09/10/2002 :  12:41:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There is no need to loop through all the columns to find a column position, just use the function colnum, like
ii=colnum(Zeit);
worksheet -t ii 4;

CP


Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/10/2002 :  1:16:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Also, you will always get a null result if you try to access a text property with object.textproperty$=;. You need to do assign it to a text variable as you've done in your loop...

%B=wks.col2.name$;
%B=;

...Which brings us back to the question of why your script doesn't work. I can see nothing wrong with it and it works when I try it.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 09/10/2002 1:28:59 PM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 09/10/2002 :  4:13:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Where is the script? This script assume the worksheet as the active window. Maybe you are running this script and in that context the worksheet is not the active window? In that case, you will need to use things like
win -o myWksName {....}

CP




Edited by - cpyang on 09/10/2002 4:13:20 PM
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