I have the folling code which imports my CSV file into the respective columbs on my datagridview
I would like to clean the string by removing any " from the string before populating the datagridview.

can anyone point me in the right direction please?

 Dim newstring As String = Nothing 
        Dim sr As New IO.StreamReader("c:\vectacus.csv")
        Dim dt As New DataTable
        Dim newline() As String = sr.ReadLine.Split(","c)
        dt.Columns.AddRange({New DataColumn(newline(0)), _
                             New DataColumn(newline(1)), New DataColumn(newline(2)), New DataColumn(newline(3)), New DataColumn(newline(4)), New DataColumn(newline(5)), New DataColumn(newline(6)), New DataColumn(newline(7)), New DataColumn(newline(8)), New DataColumn(newline(9)), New DataColumn(newline(10))})
        While (Not sr.EndOfStream)
            newline = sr.ReadLine.Split(","c)
            Dim newrow As DataRow = dt.NewRow
            newrow.ItemArray = {newline(0), newline(1), newline(2), newline(3), newline(4), newline(5), newline(6), newline(7), newline(8), newline(9), newline(10)}
            dt.Rows.Add(newrow)
        End While
        DataGridView1.DataSource = dt`
Dim newline() As String = sr.ReadLine.Replace("""","").Split(",")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.