Results 1 to 29 of 29

Importing quoted text file

Threaded View

  1. #22
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Problem with importing quoted text file

    ok... opened the txt file
    and
     Do While Not EOF(1)
            Line Input #1, data
            Debug.Print data
            For x = 1 To Len(data)
                char = Mid(data, x, 2)
               Debug.Print char
                If char = ",""" Or x= Len(data) Then
                    ActiveCell.Offset(r, c) = txt
                    c = c + 1
                    txt = ""
                Else
                    If char <> Chr(34) Then _
                      txt = txt & Mid(data, x, 1)
                End If
            Next x
            c = 0
            r = r + 1
        Loop
        Close #1
    Last edited by pike; 05-21-2010 at 05:12 AM. Reason: use x as i in use

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1