|
-
Aug 25th, 2010, 04:02 PM
#1
Thread Starter
Hyperactive Member
TextFieldParser question
I am learning to use TextFieldParser to read a fixed width text data file.
It works great. I copied code below.
Question: How to stop at the end of each line because I need to add some code?
Using tf As New TextFieldParser(fileName)
tf.TextFieldType = FileIO.FieldType.FixedWidth
tf.SetFieldWidths(60, 30, 20) //three columns
Dim row As String()
While Not tf.EndOfData
row = tf.ReadFields()
For Each field As String In row
MessageBox.Show(field)
//need to add code in the end of each record, how?
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|