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
 Worksheet names including a dash (-)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DrKlein1

Germany
6 Posts

Posted - 07/22/2016 :  07:53:29 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Orign 2015G (64-bit)
Operating System: Windows 7

When a worksheet contains a dash in its name, like:
XLS0901-2-5
the labtalk command:
%E!cell(2,1)=;
returns an error message.
When I remove the dashes (XLS090125), the command works.
Is there a workaround so I can keep the name including the dashes?
The name is taken from an imported filename.

Thanks,
Oliver

Hideo Fujii

USA
1582 Posts

Posted - 07/22/2016 :  10:03:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Oliver,

> When a worksheet contains a dash in its name, like:
> XLS0901-2-5
> the labtalk command:
> %E!cell(2,1)=;
> returns an error message.

It seems the interpreter tried to evaluate the sheet name as a formula which contains the subtraction;
I'm not sure if it is a bug or not, but anyway using the traditional string register is tricky for substitution.
As a better manner. it may be better to use the string variable like:
///////////////////////////////
> %E=;
[Book1]XLS0901-2-5
> bs$=%E;
> bs$!cell(2,1)=;
bs$!cell(2,1)=888
///////////////////////////////

Or, my preferred style is to use the range variable, which is versatile once it is declared, like:
///////////////////////////////
> range rr=%E!col(1);
> rr(2)=;
> rr[2]=;
rr[2]=888
///////////////////////////////


I hope this helps.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 07/29/2016 11:37:12 AM
Go to Top of Page

DrKlein1

Germany
6 Posts

Posted - 07/26/2016 :  04:04:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, it helped, thanks a lot!
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 07/29/2016 :  11:44:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Oliver,

Sorry, the second sample above has mistake as crossed out...
The old rr(2)=; means the function notation with the argument=2 by regarding the dataset
as a function using inter/extrapolation.
The correct rr[2]=; with brackets [...] is a reference to the cell with the index.

My apologies.

--Hideo Fujii
OriginLab
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