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 for Programming
 LabTalk Forum
 Finding end of data in Worksheet

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
dafay Posted - 03/11/2002 : 4:29:31 PM
I am using Origin 5.0. I wish to automate the import of ASCII data, which involves detecting the end of the data that has been imported into a Worksheet. Detecting the end of numerical data is required because the ASCII files contain varying numbers of data points.

I have tried using script such as follows, but don't know what to test for to find the end of my numerical data:

ii=1;
get data1_a -e numPoints;
repeat $(numPoints)
{
if (data1_a[ii]="what do I put here?") set data1_a -er ii-1;
else ii++;
};

A typical transition from numerical to non-numerical data is illustrated by the following 8 data points:
5556
5556
5554
5555
--
--
--
--

I have tried testing for the string "--", but either I've got the syntax wrong, or am testing for the wrong thing.

Any suggestions would be appreciated.
5   L A T E S T    R E P L I E S    (Newest First)
rtoomey Posted - 03/15/2002 : 10:22:11 AM
Thanks for the heads up! It turns out the script driving the forum crashed. The problem has been corrected.

Ryan Toomey
OriginLab Corporation

dafay Posted - 03/14/2002 : 2:35:56 PM
FYI Moderator: While trying to post a reply to this thread, I kept receiving an OVERFLOW error and each time I tried to correct the error and repost I'd see another posting entry. I tried deleting the redundant posts but only received further error messages:
Microsoft VBScript runtime error '800a0006'

Overflow: 'cint'

/forum/inc_functions.asp, line 890


Edited by - dafay on 03/14/2002 14:44:29
dafay Posted - 03/14/2002 : 2:35:22 PM
Thanks for the suggestion, but it did not produce the hoped for results. A solution may be academic at this point. I solved my issue by first creating a worksheet template that Terminates Import (see ASCII Import Options) when non-numeric data is found, then I begin my import operation by creating a worksheet from that template as in the following code:
win -t data TC;
getfile *.dat;
open -w %A;

Were TC is the name of the worksheet template.
dafay Posted - 03/14/2002 : 2:34:04 PM
error

Edited by - dafay on 03/14/2002 14:39:19
cpyang Posted - 03/11/2002 : 6:27:42 PM
try
if (data1_a[ii]==0/0)
{
set data1_a -er ii-1;
break;
}




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