Re: reading a file that has null or blank field
- From: "ekkehard.horner" <ekkehard.horner@xxxxxxxx>
- Date: Wed, 28 Feb 2007 21:48:59 +0100
RdS wrote:
sorry...but I see you answered inline. :) That helped a lot.
I cannot statically assigned an upper boundary because some records don't contain all fields. Would there be another way to do this to handle this situation?
do until objSourceFile.AtEndOfStream
arySourceFields = split(objSourceFile.ReadLine,",",-1,1)
Select Case UBound( arySourceFields )
Case 4 ' ok no need to do more
Case 1 ' just the first number (I hope, you must check!)
arySourceFields = Array( arySourceFields( 0 ), "world", 3, 4, 5 )
Case Else
skip or raise hell
e.g. WScript.Echo "Bad data in Line ..." : Exit Do
End Select
work with all fields
loop
.
- References:
- Re: reading a file that has null or blank field
- From: ekkehard.horner
- Re: reading a file that has null or blank field
- From: RdS
- Re: reading a file that has null or blank field
- Prev by Date: Re: Script Editor
- Next by Date: Re: Convert .net xmlhttp code to vbs
- Previous by thread: Re: reading a file that has null or blank field
- Next by thread: Re: reading a file that has null or blank field
- Index(es):
Loading