title: CSV file export
body: <p>I wanted to get multiple txt file into single sheet, I have tried below code but it is not coping data below exiting data in the sheet.</p>
  
  <p>data is over writing existing data.</p>
  
  <pre><code>Sub QueryImportText()
      Dim sPath As String, sName As String
      Dim LR As Long, qt As QueryTable
  
      sPath = "F:\WIN7PROFILE\Desktop\New folder\"
      sName = Dir(sPath &amp; "*.txt")
      LR = Sheets("Log").UsedRange.Rows.Count
      Do While sName &lt;&gt; ""
          LR = LR + 1
  '        Range("A" &amp; LR).Value = sName
          With Sheets("Log").QueryTables.Add(Connection:= _
              "TEXT;" &amp; sPath &amp; sName, Destination:=Range("A" &amp; LR))
          .Name = Left(sName, Len(sName) - 4)
          .FieldNames = True
          .RowNumbers = False
          .FillAdjacentFormulas = False
          .PreserveFormatting = True
          .RefreshOnFileOpen = False
          .RefreshStyle = xlInsertDeleteCells
          .SavePassword = False
          .SaveData = True
          .AdjustColumnWidth = True
          .RefreshPeriod = 0
          .TextFilePromptOnRefresh = False
          .TextFilePlatform = 1252
          .TextFileStartRow = 1
          .TextFileParseType = xlDelimited
          .TextFileTextQualifier = xlTextQualifierDoubleQuote
          .TextFileConsecutiveDelimiter = False
          .TextFileTabDelimiter = False
          .TextFileSemicolonDelimiter = False
          .TextFileCommaDelimiter = False
          .TextFileSpaceDelimiter = False
          .TextFileOtherDelimiter = "|"
          .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1)
          .TextFileTrailingMinusNumbers = True
          .Refresh BackgroundQuery:=False
          End With
          sName = Dir()
          For Each qt In ActiveSheet.QueryTables
              qt.Delete
          Next
      Loop
  End Sub
  </code></pre>
  
  <p>Can you help me with correct code so all the txt file pasted one below another in "Log" sheet</p>