title: VBA data parser changing text values
body: <p>I found this useful hunk of code online but I am running into a problem where excel is incorrectly copying the text from the files. The script parses the data from a text file and adds it to a new sheet for every text file. Sometimes the values are returned correctly but sometimes they are not. For example, if the text is &quot;00000E8F&quot; it parses it correctly but if it is &quot;00000E02&quot; it reads this as scientific notation and therefore sets the value to 0. Is there a way to force the script to copy the text as a &quot;text&quot; datatype?</p>
  <pre><code>Sub Test()
  'Script is meant for .txt files with 4 columns seperated with tabs
      Dim xWb As Workbook
      Dim xToBook As Workbook
      Dim xStrPath As String
      Dim xFileDialog As FileDialog
      Dim xFile As String
      Dim xFiles As New Collection
      Dim I As Long
      Set xFileDialog = Application.FileDialog(msoFileDialogFolderPicker)
      xFileDialog.AllowMultiSelect = False
      xFileDialog.Title = &quot;Select a folder [Kutools for Excel]&quot;
      If xFileDialog.Show = -1 Then
          xStrPath = xFileDialog.SelectedItems(1)
      End If
      If xStrPath = &quot;&quot; Then Exit Sub
      If Right(xStrPath, 1) &lt;&gt; &quot;\&quot; Then xStrPath = xStrPath &amp; &quot;\&quot;
      xFile = Dir(xStrPath &amp; &quot;*.txt&quot;)
      If xFile = &quot;&quot; Then
          MsgBox &quot;No files found&quot;, vbInformation, &quot;Kutools for Excel&quot;
          Exit Sub
      End If
      Do While xFile &lt;&gt; &quot;&quot;
          xFiles.Add xFile, xFile
          xFile = Dir()
      Loop
      Set xToBook = ThisWorkbook
      If xFiles.Count &gt; 0 Then
          For I = 1 To xFiles.Count
              Set xWb = Workbooks.Open(xStrPath &amp; xFiles.Item(I))
              xWb.Worksheets(1).Copy after:=xToBook.Sheets(xToBook.Sheets.Count)
              Columns(&quot;A:A&quot;).Insert Shift:=xlToRight, _
                  CopyOrigin:=xlFormatFromLeftOrAbove
              CSB_File_Interpretation
              On Error Resume Next
              ActiveSheet.Name = xWb.Name
              On Error GoTo 0
              xWb.Close False
          Next
      End If
      Summary
  End Sub
  </code></pre>