Results 1 to 2 of 2

Thread: [RESOLVED] another fixed width textfile

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    138

    Resolved [RESOLVED] another fixed width textfile

    Hi gurus

    I hope someone can help me on this

    thanks to this forum, I found away to read a fixed position text file, but I encounter a problem, I know which field I want to go and check, how can I jump directly to the field I need. Readfields does not helps.

    for instance I need to check on field 3 and 7 of the row before the next row is read.

    this is what I have so far

    Code:
    readtext.TextFieldType = FileIO.FieldType.FixedWidth
                readtext.SetFieldWidths(5, 6, 10, 25, 12, 8, 8)
                Dim currentRow As String()
                
                While Not readtext.EndOfData
                    
                        currentRow = readtext.ReadFields()
    
                        Dim currentField As String
                        For Each currentField In currentRow
                            MsgBox(currentField)
                        Next
    is this my best approach to read a fixed position text file?

    thanks gurus

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    138

    Re: another fixed width textfile

    Thanks gurus found solutions to my problems

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width