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
 All Forums
 Origin Forum
 Origin Forum
 How to extract useful information upon importing

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
tantiger Posted - 03/26/2002 : 02:19:56 AM
I have a kind of ascii file to import to Origin.

However, when I tried to extract useful information out, it seems what I can do is to manipulate the %Z string till I found the information I want.
For example, the file is like this:
"------------------
DSC4
...
Sample Size: 4.2500 mg
....
___________________"

I wrote a script to check the letters in %Z till the "Sample Size:" is met, then take the 6 following ascii code to a variable.

Is there any easier method to get the sample size?

Another question is, how can I import another file in the data sheet without deleting the data it already contains?

Thanks a lot!

Edited by - tantiger on 03/26/2002 02:22:50
6   L A T E S T    R E P L I E S    (Newest First)
tantiger Posted - 03/27/2002 : 9:02:37 PM
Yes, you are quite right.

I didn't notice there is a partial import in the single file import window.

Thank you !
Mike Buess Posted - 03/27/2002 : 8:56:22 PM
I don't quite understand what you mean. You've been able to import as new columns for quite some time (at least back to Origin 6.0). In ASCII Options just select Import Into Worksheet as 'New Columns'.

...Of course you have to save the template to make it stick.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/27/2002 21:01:33
tantiger Posted - 03/27/2002 : 8:11:41 PM
I would like to import a new file as columns. However, other situations are also attractive .

I know there is a new functino in 6.1, which enables me to import them as new columns provided that I know exactly which files to be imported. But sometimes, I need to import another one as a new column, and there is no simple method for that in Origin, except copy and paste.

Hope the new version can do this.
I have studied your post in LabTalk forum, I think that can work in my situation.

Thank you very much .
CStorey Posted - 03/27/2002 : 12:19:25 PM
Not sure I understand what your asking. Are you looking for a LabTalk solution to either:

1) Do you want to be able to import a file into a wks, then add another file as new columns?
2) Do you want to be able to import a file into a wks, then add another file as new rows?
3) Import multiple files into a single wks as new columns?

4) Import multiple files into a single wks as new rows?

All of these are possible. Let me know which if any of these is what you are looking for or give me an example of exactly what you want.





Craig Storey
Origin WebRing Member - http://g.webring.com/hub?ring=originwebring
tantiger Posted - 03/26/2002 : 9:33:35 PM
CStorey,

Yes, your method works very well.

Thank you very much!

Except the method in LabTalk Forum, do you have other way to import the second file in the same data sheet? Because sometimes, after I have made a multi-import, I will realize one or two more files are needed. In other software, such as SigmaPlot, you can always import another file in the current data sheet without modifying the current sheet.
CStorey Posted - 03/26/2002 : 11:42:40 AM
There is a simpler way depending on the exact format of your data. I suggest you look at the documentation for "Substring Notation".

Here's an example.

type.redirection=1; // Display results in script window.

/// Create a dummy header in %Z
%Z=BC00_DBS.DAT
VC = Common
VB IB
;

%M=%[%Z, "="]; %M=; // Return everything to the left of the "=" sign

%M=%[%Z, >"="]; %M=; // Return everything to the right of the "=" sign

%A=%[%Z,@2]; %A=; // Return line #2 (@n returns the nth line)

In your case I believe either would work, depending on what the rest of the string looks like. Maybe use the @n trick to get to the right line, then search the line with %[%X, >":"] to get mass.

If you need more help just post a full header and we can be more specific.


Craig Storey
Origin WebRing Member - http://g.webring.com/hub?ring=originwebring

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000