title: using excel vba read and edit text file into excel sheet
body: <p>i would like to extract data from text file into excel worksheet.<br>
  my text file format is not the same for each line.<br>
  so for each line read, the first data would go input into the 1st excel column, and the next data to go into the 2nd excel column(same row) which is 2 or more blank spaces away from the 1st data. This goes on until all the text file data in that line are input into different columns of the same row.  </p>
  
  <p>text file:<br>
  data1 (space) data2 (space,space,space) data3 (space,space) data4  </p>
  
  <pre><code>excel:  
  column 1      | column 2 | column 3  
  data1 data2   | data3    | data4  
  </code></pre>
  
  <p>i do not know how to identify the spaces in each line to be written to excel sheet, pls advise, below is my code:  </p>
  
  <pre><code>Sub test()
    Dim ReadData, myFile As String
  
    myFile = Application.GetOpenFilename()
    Open myFile For Input As #1
  
    Do Until EOF(1)
      Line Input #1, ReadData
    Loop
  End Sub
  </code></pre>