Author |
Topic  |
|
WiljanVerhees
Netherlands
7 Posts |
Posted - 06/01/2018 : 05:56:03 AM
|
origin 2016 %A=%([workbook]worksheet,1,1) works fine as long as the cell contains a number. If it contains text it doesn't work. Using the same commands is working when putting the text into the cell. Is there a way to fix this? Thanks a lot
wve |
|
Hideo Fujii
USA
1582 Posts |
Posted - 06/01/2018 : 09:39:58 AM
|
Hi wve,
It seems working okay in my Origin 2018b and Origin 9.1 such as:
%A=%([Book1]Sheet1,1,1);
%B=%([Book1]Sheet1,1,2);
%A=;
%B=;
1.4142135623731
ABC Maybe you can put the trace of the performance result here?
--Hideo Fujii OriginLab |
Edited by - Hideo Fujii on 06/01/2018 09:41:33 AM |
 |
|
WiljanVerhees
Netherlands
7 Posts |
Posted - 06/03/2018 : 03:14:35 AM
|
quote: Originally posted by Hideo Fujii
Hi wve,
It seems working okay in my Origin 2018b and Origin 9.1 such as:
%A=%([Book1]Sheet1,1,1);
%B=%([Book1]Sheet1,1,2);
%A=;
%B=;
1.4142135623731
ABC Maybe you can put the trace of the performance result here?
--Hideo Fujii OriginLab
Hi Hideo,
thanks for the reply.
example code:
%([Book1]Sheet1,1,1)="text"; %([Book1]Sheet1,2,1)= 1.234;
%A=%([Book1]Sheet1,1,1); %B=%([Book1]Sheet1,2,1);
type -a $(%A); type -a $(%B);
getting it into the worksheet just works fine but the return is:
-- 1.234
Wiljan
wve |
 |
|
cpyang
USA
1406 Posts |
|
WiljanVerhees
Netherlands
7 Posts |
Posted - 06/03/2018 : 07:23:15 AM
|
quote: Originally posted by cpyang
$(expression) is to convert a expression into number, so you are converting "text" to a number and thus a missing value is the result. Change your example into
%([Book1]Sheet1,1,1)="text";
%([Book1]Sheet1,2,1)= 1.234;
%A=%([Book1]Sheet1,1,1);
%B=%([Book1]Sheet1,2,1);
type -a "%A";
type -a "%B";
You can read more about the substitution here
https://www.originlab.com/doc/LabTalk/guide/Substitution-Notation#.24.28_.29_Substitution.24.28_.29_Substitution
CP
Aha...that simple...I knew it had to be something like this. thanks a lot!!!
wve |
 |
|
|
Topic  |
|
|
|