I use the following code:
Open FileName For Input As #1
Do While Not EOF(1)
Line Input #1, LineString
LineString = Replace(LineString, "~", " ")
LineString = Replace(LineString, vbTab, " ")
LineString = Trim(LineString)
to read the following data:
#-------- -------------- ----- -------------------
DEPT .F :0 Index
DEVI .DEG :1 Hole Deviation
HAZI .DEG :2 Hole Azimuth
~Ascii Data Section
3980.00000 2.12431 63.49890
3980.50000 2.12431 63.49890
3981.00000 2.12431 63.49890
3981.50000 2.12431 63.49890
3982.00000 2.12431 63.49890
3982.50000 2.12437 63.49815
3983.00000 2.12674 63.46420
3983.50000 2.13017 63.39584
3984.00000 2.13136 63.30776
3984.50000 2.13463 63.24054
3985.00000 2.13659 63.08165
3985.50000 2.13746 63.01556
3986.00000 2.13766 62.94527
Due to the Unix termination characters that come across from our Unix server, extremely long lines (>1000 characters) gets read into LineString. My program cannot then read the appropriate keywords to know when to start reading data. If the data file is loaded into a text editor and saved, the problem is solved - somehow doing that gets rid of the Unix terminators.
Thanks,
Paul H.