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
 Individual cell data retrieval
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

wallacej

UK
Posts

Posted - 05/23/2005 :  06:01:03 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (7.5):
Operating System: win2k


I currently use the following line of script to retrieve elements 4 and 5 of the data in cell at column 10 of row 1.

%K = %[%(sheet1, 10,1),4:5];

The data in the cell has now changed and has some user inputted text at the beginning. This text can be of variable length which means that the elements I wish to retrieve are no longer in the set positions of 4 and 5.
My plan is to retrieve the data elements by using their position from the end of the value, as opposed to the beginning. Is it possible to do this in lab talk? Or do I have to put the value of the cell into a variable and perform some manipulation using C?

Thanks in advance

Mike Buess

USA
3037 Posts

Posted - 05/23/2005 :  07:36:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The length of string %A is given by %[%A]. Either of these expressions will get the last two characters of %A...

%K=%[%A,%[%A]-1:%[%A]];

%K=%[%A,>%[%A]-1];

Mike Buess
Origin WebRing Member
Go to Top of Page

wallacej

UK
Posts

Posted - 05/23/2005 :  12:06:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike

Worked a treat!

Wallace

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