title: How to import .csv file to my datagridview in vb.net?
body: <p>My used code is:</p>
  
  <pre><code>Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
      Dim fName As String = ""
      OpenFileDialog1.InitialDirectory = "c:\desktop"
      OpenFileDialog1.Filter = "CSV files (*.csv)|*.CSV"
      OpenFileDialog1.FilterIndex = 2
      OpenFileDialog1.RestoreDirectory = True
      If (OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then
          fName = OpenFileDialog1.FileName
      End If
      txtpathfile.Text = fName
      Dim TextLine As String = ""
      Dim SplitLine() As String
  
      If System.IO.File.Exists(fName) = True Then
          Dim objReader As New System.IO.StreamReader(fName)
          Do While objReader.Peek() &lt;&gt; -1
              TextLine = objReader.ReadLine()
              SplitLine = Split(TextLine, ",")
              Me.DataGridView2.Rows.Add(SplitLine)
          Loop
      Else
          MsgBox("File Does Not Exist")
      End If
  End Sub
  </code></pre>
  
  <p>My output looks wrongly encoded:
  <img src="https://i.stack.imgur.com/tCjKc.png" alt="enter image description here">    </p>
  
  <p>What's wrong with my code? Please help me. Thank you for consideration.</p>