Question: how to export data from datagridview to csv in vb.net?
Answer: 'Build the CSV file data as a Comma separated string. Dim csv As String = String.Empty.
'Add the Header row for CSV file. ... 
csv += column.HeaderText & ","c.
'Add new line. ... 
'Adding the Rows. ... 
For Each cell As DataGridViewCell In row.Cells. ... 
csv += cell.Value.ToString().Replace(",", ";") & ","c.
csv += vbCr & vbLf.