T O P I C R E V I E W |
dwheeler |
Posted - 08/27/2013 : 12:35:59 PM Origin Ver. and Service Release (Select Help-->About Origin): Origin 9.0.0 SR2 Operating System: Windows XP SP3
I have a worksheet filled with the contents of a batch processing. The first column of the summary sheet is the filename. I'd like to insert a "B" column that contains a numeric value extracted from the filename in column A.
I've gotten as far as this:
In the "Set values" dialog box, I insert the following:
col(b)=
Substitute(Mid(Col("Dataset"),11,6)$,".","_")
The results in col(b) being filled with the correct information, but it's formatted as a string, and so I can't do a subsequent calculation on that data… Is there a way to convert this string to a double using the "Set values" dialog? Or is this a quick thing I can throw into the script window? |
4 L A T E S T R E P L I E S (Newest First) |
dwheeler |
Posted - 08/28/2013 : 3:11:56 PM That's great news! It seemed like a simple function, and I couldn't seem to find any documentation on it… glad to know I wasn't just missing it.
quote: Originally posted by snowli
BTW dwheeler,
Sorry for the inconvenience, in coming 9.1, we have added a Value() function which can change numeric strings into numeric.
Thanks, Snow Li OriginLab Corp.
|
dwheeler |
Posted - 08/28/2013 : 3:08:29 PM That works perfectly, thank you.
quote: Originally posted by Hideo Fujii
Hi dwheeler,
Maybe you can try this way:
Say, your numeric strings are stored in col(B), you can run the Set Column Values tool with the following formula:[In the "Before Formula Scripts" box]:
dataset loose1;
copy col(B) loose1;
[In the main "Col(C)=" formula box]:
loose1 Here, loose1 is a name of a loose dataset, which has the numeric dataset type, and the strings are converted to numeric values.
Does it work?
--Hideo Fujii OriginLab
|
snowli |
Posted - 08/27/2013 : 4:49:25 PM BTW dwheeler,
Sorry for the inconvenience, in coming 9.1, we have added a Value() function which can change numeric strings into numeric.
Thanks, Snow Li OriginLab Corp.
|
Hideo Fujii |
Posted - 08/27/2013 : 3:01:45 PM Hi dwheeler,
Maybe you can try this way:
Say, your numeric strings are stored in col(B), you can run the Set Column Values tool with the following formula:[In the "Before Formula Scripts" box]:
dataset loose1;
copy col(B) loose1;
[In the main "Col(C)=" formula box]:
loose1 Here, loose1 is a name of a loose dataset, which has the numeric dataset type, and the strings are converted to numeric values.
Does it work?
--Hideo Fujii OriginLab |
|
|