hi all,
i made a proejct that runs sql command to datagridview and than export it to csv file, everything going fine but i got line break problem. Here my export code;
im filePath As String = "C:\FULLWork\csv\dbslimit.csv"
Dim delimiter As String = ";"
Dim sb As New StringBuilder()
For i As Integer = 0 To DataGridView1.Rows.Count - 1
Dim array As String() = New String(DataGridView1.Columns.Count - 1) {}
If i.Equals(0) Then
For j As Integer = 0 To DataGridView1.Columns.Count - 1
array(j) = DataGridView1.Columns(j).HeaderText
Next
sb.AppendLine([String].Join(delimiter, array))
End If
For j As Integer = 0 To DataGridView1.Columns.Count - 1
If Not DataGridView1.Rows(i).IsNewRow Then
array(j) = DataGridView1(j, i).Value.ToString()
End If
Next
If Not DataGridView1.Rows(i).IsNewRow Then
sb.AppendLine([String].Join(delimiter, array))
End If
Next
File.WriteAllText(filePath, sb.ToString(), System.Text.Encoding.Default)
the problem begins 474. line